Don't raise ReturnMainLoop exception for unit test

Another case where a test raises ReturnMainLoop exception.