Detect and close empty where-blocks.