Fix two more issues with modal dialog focus on Windows.