Skip blocks if they have no locations. Fixes #4270