Fix regexp matching. $<n> and Regexp.last_match behaves quite differently.