Actually, it seems like one of the existing windows gets cloned and that is put on top of the minibuffer without modeline.
It looks something like this.
So the minibuffer looks completely fused with Win 2 of Buf x (that somehow got created automatically when I enabled debug-on-error).
After some window switching, the mode line for Win 2 appears automatically.
==============================================
| Win 1 - Buf x |
----------------------------------------------
| Mode-line for Win 1 |
==============================================
| Win 2 - Buf x |
----------------------------------------------
| Minibuffer |
==============================================