Further fixes to allow for PERMUTATION_INDEX