Fixed check in isTitleInEntityNamespace

$namespace is a namespace id while entityNamespaces contains the namespace names indexed by the
corresponding ids. This led to always return false when items are not stored in the main namespace.

Change-Id: Ib08bbfd2477ba5c7780377890d65884672fb2dd5
Merge "Fixed check in isTitleInEntityNamespace"