Maybe it is better to have a law arranging property of the corpse, or about ways to treat corpses in a dignified way, something like that. Necrophilia seems a bit to morbid a subject for a selfrespecting legal system to specifically address. There is no law against thieves putting their dick in a stolen TV and that is less morbid then NP in my opinion.
Might make law a more popular subject though