[[ Bug 13311 ]] Take block origin into account when setting flagged range
Merge pull request #1112 from runrevali/bugfix-13311

Bugfix 13311