Fixing name resolution and overriding source again.

Fixes #790.