Warning is thrown when stacking on differing domains

Closes #1111
move the `warn = oldWarn` to before the assertion, so even if the test fails, it doesn't blow up `warn`