Fix and improve CFG/Basic block invariants in the NCG.
The TLDR is that the NCG generated a new basic block, but did not insert a NEWBLOCK meta instruction in the stream which caused a quite subtle bug.
Further there was an issue with not properly determining the successors of a block in the loop level analysis.
This MR fixes #17334 (closed) by fixing both of those.
Edited by Andreas Klebinger