fixes #433, and introduces a smarter resolution mechanism
tests for #433
rebuilt