remove shared VariableExpression instances