For some reason I missed my Zuhr prayer. When I got my first opportunity and reached the place reserved for prayers in the office premises, people were offering the 'Asr prayer in congregation. I offered my Zuhr prayer with the congregation and later offered my 'Asr prayer separately based on the information that no individual prayer can be offered during congregation and that during the battle of Khandaq when the Prophet (sws) missed prayers, he offered them at the first opportunity in the same order in which they fell due when missed. Mu'adh Ibn Jabal (rta) used to lead 'Isha prayer in congregation when he himself was offering supererogatory prayers. This shows that the Imam's intention and that of his followers' may be different. Was my action justified?
I think that the matter of Mu'adh (rta) is quite different from that of yours. He had offered his obligatory prayer before leading the prayer in his own tribe. Had you offered your 'Asr prayer and later found the congregation, then you could have done so. Since you had to offer your 'Asr prayer which is obligatory to offer within the prescribed time, you cannot leave that and offer the missed one which you could now offer anytime. However, it does not mean that you need to repeat the prayer. You used your reason, which unfortunately led you to a wrong conclusion, but none can render your prayer unacceptable. You need only to correct your view and act accordingly in future.