[[ Bug 13247 ]] Restrict searching to block range where appropriate
Merge pull request #1076 from runrevali/bugfix-13247

[[ Bug 13247 ]] Restrict searching to block range where appropriate