Re-add old at_index algorithms and fix at_key.