Only call real_index() if necessary

If normalisation leaves the string unchanged, just use the indexes
as-is, instead of using the expensive real_index() method to calculate
them.