faster and more correct implementation of the Package::Stash API