IDEA-123145 New project wizard is broken

(cherry picked from commit 0112f24bee3f14f5c3a746bb59bc7cfe496d6da0)
IDEA-99329 Buggy UI when manually adding framework support for a module

(cherry picked from commit b6c6b959007ccbf78897b11cb44735b8b37d6e28)