Instead of running off, again, on a wild goose chase, it maybe would be simpler to just read keys, the official documentation? It mentions there that:
Starting with Perl 5.14, keys can take a scalar EXPR, which must contain a reference to an unblessed hash or array. The argument will be dereferenced automatically. This aspect of keys is considered highly experimental. The exact behaviour may change in a future version of Perl.
... and without seeing your code, my guess is that you are "using" that experimental feature, knowingly or not.