Aha. Thanks for bearing with me while my brain slowly works through the rules.
I now see where I've gone wrong. I'd forgotten that if I wanted to stopover in DXB then that would count towards the limit of two in the continent of origin. Thus I was expecting to be able to have those two stopovers in London and one in DXB. Duh.
So if I want to stopover in DXB then I need to make an additional transit in London, either 17-18 or 19-20.
Thanks christep and Viajero for your help.