All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
The Prophetic narration which you pointed to in the question is reported in history and biography books, and narrated by ‘Amr ibn Maymoon Al-Awdi who was from the generation which followed the companions .
He, heard ‘Abdullaah ibn Mas’ood saying: “Stick to the Jamaa’ah (the group) as Allaah supports the Jamaa’ah...”, and he was encouraging people to stick to the group and be united.
Once, he [‘Amr] was in company with Ibn Mas’ood and heard him say: “You will be ruled by rulers who will delay the performance of the prayer from its prescribed fixed time. Therefore, you should perform the prayer at its prescribed fixed time as this is a religious obligation, and then pray with them, and your prayer (with them) will be considered for you as a supererogatory prayer.” Then, he mentioned the following at the end of his statement: “The Jamaa’ah is what confirms the truth even if you were alone.”
What ‘Abdullaah ibn Mas’ood meant is that whoever is upon the truth which is legislated in religion, he is with the first Jamaa’ah, which is that of the Prophet and his noble companions . Therefore, the group of ignorant people who contradict the truth and do not follow it should not be taken into account. Corruption may spread among people and moral standards may change, and their Jamaa’ah may be following falsehood. Therefore, one should go back to the correct and firm concept of the meaning of Jamaa’ah, who are the first generation who received the revelation from the Prophet . Hence, the meaning of the Jamaa’ah does not mean that if a person performs the prayer alone, he has performed the congregational prayer, because the congregational prayer is achieved by two persons or more. Rather, what he meant is that if he had prayed on time and did not delay it, he is in conformity with the truth upon which the Muslim community is upon.
Allaah Knows best.