Fix several bugs with null blocks and removing old split branches