Fix issue 9289: Show deprecations even when gag is on

Deprecations warnings should be shown everywhere, because if you are
using *any* deprecated features (even in traits or static ifs) you
should be noticed.

This pull request will pass the test suite only when pull #1579 is merged.

I can update this if pull #1579 doesn't get accepted but this one does.