Dignity of the dead bodies indisputably has to be respected – nobody would want their bodies to be used as the research material in law enforcement authorities where the bodies are tortured, shot, or torn to pieces by bombs to prove the credibility of a certain crime or possible consequences of the application of certain appliances and weapons. It is even more disgusting to find out how human compost has been invented – it is obvious that there would be hardly anyone who would choose a fruit or a vegetable from such a garden. But at the same time, those who will their bodies for the benefit of research institutions have to be ready for some experiments done to them – they do not define what procedures they allow to be done to their bodies and which are totally unacceptable.
Here comes the issue of utility – those who will the bodies to hospitals usually want to save the lives of some people with their organs or want to make use for their government or the whole of humanity. If the institution that owns the body decides that giving the body for shooting or blowing experiments is an issue of unarguable utility, then they may do it, and there will be nothing illegal in it. Another issue is whether it will be immoral or not – people who willed their bodies for the sake of science would have possibly been horrified if they found out what their body was used for. Even having the full rights for the body utilization, the researchers are giving bad examples for others who see the immoral, cynical usage of cadavers – this is likely to lead to a dramatic reduction in those willing to help scientists with their dead bodies.