Remove usage of Hash#slice as this is a core extension that seems to have ill-defined semantics.