Fixes #5556. Some tests needed to be moved around to make sure the stubbing wouldn't break future tests.