Particularly in the case that you're calling findAll, you want matchgroups to refer to the same underlying text regardless of which string you're looking at.
This modifies the implementation so we have a consistent view of matches across the API.