fix too strict regular expression when determining if the definition is
a domain, fixes #2