Navigator: use class map in query for annotated entities

Having this extra query is possibly a tiny bit faster and friendlier to the
database than letting it compare strings in the original query.