I see duplication of a copyrighted/trademarked work as theft. Print a job like that and you are accessory to theft.
Using a copyrighted work as inspiration for a new idea is simply evolution. The line between imitation and inspiration is subjective, but it comes down to doing what you're comfortable with. You have to make the call and if it goes to court, it's a judge or some other body who makes the call, based on their opinion as the weather or not the work is "derivative". Fuzzy lines and grey areas are common...
You have to go with your gut and stick to your principles. I just did a job for a strip club. Scantily clad girl in front of a car. I have no problems with doing work of a sexual nature, because I don't find anything wrong with sex. I won't, however, put it in my online portfolio, out of respect for the fact that many people share my work with their kids (lots of children's book illos) and I don't want to offend them. I do this out of choice.