I think as_dummy tries to remove the ambiguity of things like `Integral(f(x), (x, 0, x))` where the same variable is both bound and free by replacing the bound versions by a dummy.