id would say the
ecu has to re-learn its adaptions or has learnt poor adaptions. get them to reset the adaptions, some cars require a special drive profile after adaptions are reset which ford would know about if they do.
If its not that then i would say the engine has a air leak into the intake and because the
ecu was flashed most likely the adaptions were reset and now the engine has to relearn the extra air going into the engine and adapt to it. (casuing the poor idle)
Thats my guess