[[ Bug 13311 ]] Take block origin into account when setting flagged range