re-added end-of-map check for fmap-based pcre scanning