Redmine#4831: add more namespace resolution checks

see https://cfengine.com/dev/issues/4831