Fix live dev highlight being out of place in edge cases

For #7921, where Live Preview highlight is out of place when using with brackets.io site.

Tested with brackets.io/index.html, brackets.io/contribute.html, and the (German) Getting Started page.