Optimization in _parse_fh: use index() instead of a regexp
_parse_fh: optimize expression order in conditions
_parse_fh: minor regexp optimization
_do_find_module: micro-optimization
changelog for bits cherry-picked from PR#4