WIP U4-6035

This is a WIP PR for [U4-6035](http://issues.umbraco.org/issue/U4-6035).

I just implemented a test that demonstrates the problem in action or at least I'm pretty sure the test shows the problem in action, it fails earlier than I expected, with the first assert not the last.

Anyway I'll keep committing to this PR unless someone else can work out a better solution :stuck_out_tongue: 

Feedback welcome