UiSourceViewer: Workaround if error bounds out of (visible) range.

 * Thanks to Florian Brosch. Code is copied from a vala editor draft.