Disallow empty blocks.

Related to #9849, #10072