Index: src/AST/Print.cpp
===================================================================
--- src/AST/Print.cpp	(revision 8f1e03582aaeca10f66354d884763209e5fe44bc)
+++ src/AST/Print.cpp	(revision 79ae13d5c771bea08f4655712505e7fa1a8fc73a)
@@ -90,5 +90,5 @@
 
 		static constexpr auto Qualifiers = make_array<const char*>(
-			"const", "restrict", "volatile", "lvalue", "mutex", "_Atomic"
+			"const", "restrict", "volatile", "mutex", "_Atomic"
 		);
 	};
@@ -1624,4 +1624,4 @@
 constexpr array<const char*, 3> Printer::Names::FuncSpecifiers;
 constexpr array<const char*, 6> Printer::Names::StorageClasses;
-constexpr array<const char*, 6> Printer::Names::Qualifiers;
+constexpr array<const char*, 5> Printer::Names::Qualifiers;
 }
Index: src/AST/TypeEnvironment.hpp
===================================================================
--- src/AST/TypeEnvironment.hpp	(revision 8f1e03582aaeca10f66354d884763209e5fe44bc)
+++ src/AST/TypeEnvironment.hpp	(revision 79ae13d5c771bea08f4655712505e7fa1a8fc73a)
@@ -56,4 +56,10 @@
 struct AssertCompare {
 	bool operator()( const VariableExpr * d1, const VariableExpr * d2 ) const {
+		auto kind1 = ast::SymbolTable::getSpecialFunctionKind(d1->var->name);
+		auto kind2 = ast::SymbolTable::getSpecialFunctionKind(d2->var->name);
+		// heuristics optimization: force special functions to go last
+		if (kind1 > kind2) return true;
+		else if (kind1 < kind2) return false;
+
 		int cmp = d1->var->name.compare( d2->var->name );
 		return cmp < 0 || ( cmp == 0 && d1->result < d2->result );
