I've read how C++ behaves in this case, ::X and X are not exactly the same but there's nothing that should cause this behaviour.
It may be a small bug of the compiler
Name-Look up is/are the procedure(s) used by the compiler to resolve identifier names (variable names, function names, class names etc).
A qualified name is some thing like namespace_name::class_name::member_name - that is to say, a qulaified name specifies the scope.
An unqualified name is some like x - that is there is no mention of scope.
There is a large section on unqualifiedname-Lookup in the C++ standards document.