Yes, you can have up to four flight segments in your continent of origin
BUT you can have no more than two stopovers in your continent of origin
Is that your problem? (are your stops in all of AMS, AMM and DXB more than 24 hrs - if so you have three stopovers in your continent of origin and that is not allowed)