Stores a hash of the mode name so that the same mode is always assigned to the same index independent from registration order.