Lots of bug fixes for the newly ported unspecialised block synthesis code