Fix bit ordering of the key in FI function.