Deal with interfering pairs (like nested do ... end and if ... end).