I would strongly suggest that you do the writtens for both the advanced and instrument GI prior to taking your checkride. Having a current CFI makes the issuance of the GI primarily a paperwork exercise for the FSDO. And doing both at the same time makes the inspector happy. He gets credit for 2 certificates and has to do only one set of paperwork.
If you haven't already started studying for the written exams, I will tell you that the advanced is one tough exam. Primarily because you will be asked questions about not only airplanes and helicopters, but also gliders, hot air balloons and rigid airships.
I did what you are trying to do. It took some time as there is a item in the FAAs guidance about reissuing a CFI during a CFI ride for an additional rating. So communicate with your DPE well in advance. It will pay dividends in long run.
Good luck.