You are mistaken. That file never calls keys twice on the same hash. It call keys on two different hashes (containing the same data). That code has been buggy since 5.8.1. The bug is just more likely to occur now.
Re^3: Truly randomized keys() in perl 5.17 - a challenge for testing?