Redmine#4831: add more namespace resolution checks