I think that there is a little more detail to be considered ... the sequence is landing configuration to missed approach configuration (considering landing and approach climb WAT matters .. especially for the OEI case or that possibility) and, subsequently through the clean up process.
We need to keep in mind that, while the aircraft is certificated for a missed approach with landing flap and wheels down for AEO .. the OEI case is only addressed for approach flap and wheels up. The actual numbers and flap position sequences will be Type specific.
The end result is not much different to what others have described above .. but the philosophy is.