Fix 'source-dependencies/inherited-macros'

This test was broken by the changes introduced to support internal
transitive dependencies of macro providers.

A correction to the invalidation logic has fixed the problem.