Fixed removeVariables when set is all free variables.