I will assume you know that you will be getting a 550 euro charge for your 5th European segment. Or whatever an extra segment charge is in 1st class. If you swap Paris and Dubai, at least your additional charge would be for the cdg-lhr sector, which is in business class. Or for that matter, it is a very short flight, so I would make the additional sector in M if it were up to me.
Then again, if it were up to me, I would take the Eurostar and be done with it.
Then you can use your additional segment and fly into lhr and connect to madrid. That way you can avoid using IB 1st, which I have heard nothing good about.