Replace f.has(x) -> x in f.free_symbols