Again, just FYI, You should also `(save-match-data …)` here to not spoil the match data for other functions, and `(save-excursion (widen) …)` to really search from the very beginning of the buffer, even if narrowing is in effect.

I have already fixed it myself, I am close to merging the checker, see https://github.com/lunaryorn/flycheck/tree/d.