Fix issue #3637: ModelSelector shows previously selected model after undo.