This is one which lawyers could argue over for ages. If it came before a court for settlement, I suspect that about 85% liability would be attributed to the overtaking driver and 15% to the right-turning driver.
Anyone who's been on an advanced driving course (or even just had a decent instructor for their basic training) should know that you should never overtake a queue of cars waiting to turn left, for the very reason which your question illustrates. (I suppose, however, that it might be acceptable if you happen to know that the road off to the left is a one-way street and there are also no other problems with restricted visibility). So the driver of the overtaking car would be making a 'forbidden' manouevre by any reasonable standards of safe driving.
The right-turning driver, on the other hand, would be wisest to 'exercise due diligence' when making the turn (in the same way in which, at traffic lights, you should always check for traffic crossing your path even when you've got the signals in your favour) but he is not specifically making a 'forbidden' maouevre. Thus, I believe that the majority of the liability would be attributed to the overtaker.
Chris