As shown below, when the cursor is at a statement after a block (print below), the previous block (the if block below) seems to still be highlighted as the active block, which is not expected. If a blank line is inserted above print, then the outer block is highlighted when the cursor is at print as expected.
I understand that some of the detection logic may be upstream, so I'm not sure if this is the right place to file this issue.
