This seems to be acceptable in the States, but if my memory serves me right, the CAA won't accept a flight where there were 2 PIC's. There were a few cases of this a while ago and the Belgrano stepped on a few individuals. They knew which schools were operating like this, and so checked any hours very carefully.
This was usually done by hour builders who wanted to cut the costs and is a slightly different scenario to this one, but I can't see how a student can be PIC at the same time as the instructor.