Fixed bug in resolveById.

It was not looking in the projects map first, and resulted in repeated project
resolution.