`hash locale-gen` checks for the existence of locale-gen.  Are you saying that gentoo has locale-gen, but these commands shouldn't be run for some reason?