Fix switchLayout test failure with Mongo