Fix for #8 - transitive exclusions

This should fix issue #8 (a unit test is included).