import_from_cache had a bug in it.  It now groups by *both* 'end' and 'index'.