For some unknown reason, this workaround is currently required to guarantee the shader passes validation. It seems that operations are not evaluated in the right order to guarantee that a block has been determined to be necessary or not before the Phi operation for it is evaluated and compacted.
It'd be nice to determine the reason behind this error so the workaround is not required