Use Hash#key to silence Hash#index deprecation warnings