fix SubstVar to be usable as a replace_all method