Removed excess calls to is_variable.