Fix issue#10: Explicitly-scoped entities do not resolve correctly.

Patch submitted by:	danmariefried
