Improved check for module and target uris