Fix assertion in MockServer when cleaning up after a test.