Adding an if-statement, while-loop, or for-loop in the modular view results in a broken body. It is not possible to add statements to the body in the modular view. It is possible to switch to the annotative view, add a statement (for example an empty line), and then switch back to the modular view where everything now works as intended.
Two if-statements, one fixed in the annotative view and one unaltered, added in the modular view:

Opening the completion menu in the modular view:

Or, while, and for all work the same in the modular view.
Tested on Linux.