Add testcase for failing namespace switch throwing exception from a module.

Issue #290. This currently fails, to draw attention to the issue.