Fix crash when no mached_substrings exist