Use getCanonicalNamespaces() instead of global
Report duplicate and non-canonical definition errors during checkErrors.php