Changes to properly handle $message being defined.
Add test case