Avoid checking the key index unless enabled.