Simpler index_keys function.