The case of a perverted Lancashire undertaker who posed next to the bodies of naked corpses and encouraged another man to have sex with one of them has been highlighted at an inquiry into better protecting the dignity of the dead.