Fixes #1649. Exclusion rules and other cached resolution fixes

Fixes #1649.