When must sinfulness and legal validity be considered separately under a prohibition?

Comprehensive Review and Applied Reasoning in Usul al-Fiqh