Any situation where you have more than one person logging P1 sounds like a big crock to me <img src="rolleyes.gif" border="0"> Fundamental logic says that you can't have two pilots-in-command of the same aircraft because the aircraft can only go in one direction at a time. Particularly the instructor-and-student situation, that's totally outrageous! At the end of the day if there's an engine failure, or something goes badly pear shaped, of course it's the instructor that's going to be taking control and making the command decisions about how to handle the situation - therefore he/she is the pilot in command of the flight. No one else.
It doesn't really matter who is physically poling the controls at the time - I've had a couple of times in my career when I've had to make a speedy return back to base due to unpleasant instrument indications / engine coughing and spluttering etc and I've allowed my students to keep flying the aircraft, even though I'm making the radio calls and directing my student as to where to fly the machine. I wouldn't for a second consider that my student was 'in command' of the flight though. Bear in mind that being the PiC is a burden of responsibility as well, as an instructor I couldn't envisage a situation where my student would stand up in court and be prosecuted for anything dodgy that happened in flight, if I 'happened to be' on board the aircraft and logging P1 at the time as well!!
It's interesting that there are a few airlines (back home in New Zealand at least) who don't recognize P1 time logged in the States for the purpose of total time, and to be honest it's things like this that make me understand the reason why.