Drop unneeded index variables.