try to resolve aliases before searching for a namespace, fixes #TANAL-26