handled Infinite recurssion case

1. `ActiveSupport::Cache.expand_cache_key` may raise `SystemStackError: stack level too deep` exception if key respond_to `to_a` and result itself contains key.