After the above two changes this error case will be impossible (at least, assuming our block checking logic is sound. You can't have a block which is both solid and not solid, can you?)