Wa 'alaik salam
Volume 9, Book 84, Number 60:
Narrated Anas bin Malik:
A Jew passed by Allah's Apostle and said, "As-Samu 'Alaika." Allah's Apostle said in reply, "We 'Alaika." Allah's Apostle then said to his companions, "Do you know what he (the Jew) has said? He said, 'As-Samu 'Alaika.'" They said, "O Allah's Apostle! Shall we kill him?" The Prophet, said, "No. When the people of the Book greet you, say: 'Wa 'Alaikum.'"
________________________________________________________________________
Volume 9, Book 84, Number 61:
Narrated 'Aisha:
A group of Jews asked permission to visit the Prophet (and when they were admitted) they said, "As-Samu 'Alaika (Death be upon you)." I said (to them), "But death and the curse of Allah be upon you!" The Prophet said, "O 'Aisha! Allah is kind and lenient and likes that one should be kind and lenient in all matters." I said, "Haven't you heard what they said?" He said, "I said (to them), 'Wa 'Alaikum (and upon you).
_________________________________________________________________________
Usama ibn Zayd killed an idolater in battle after the latter had said: "There is no god but Allah" (la ilaha illallah). When news of this reached Allah's Messenger he condemned Usama in the strongest terms and he said to him: "How can you kill him after he said La ilaha illallah?" He replied: "But he said it with the sword hanging over his head-"
The Prophet said again: "How can you kill him after he said La ilaha illallah?" He replied: "O Messenger of Allah, he said it in dissimulation (taqiyyatan)."
The Prophet said: "Did you split his heart open (to see)?" and he did not cease to reprove him until Usama wished that he had not entered Islam until after he had killed that man so that he might have been forgiven all his past sins through belief. Narrated by Bukhari, Muslim, Ahmad, Tayalisi, Abu Dawud, Nasa'i, al-`Adni, Abu `Awana, al-Tahawi, al-Hakim, and Bayhaqi.
___________________________________________________________________________
Al-Miqdad said: I asked, "O Messenger of Allah, suppose I and one of the idolaters battled and he cut off my hand, then I was positioned to strike him and he said: la ilaha illallah! Do I kill him or spare him?" He said: "Spare him." I said: "Even if he cut off my hand?" He said: "Even so." I asked him again two or three times whereupon he said: "If you kill him after he says la ilaha illallah then you are like him before he said it, and he is like you before you killed him." Narrated by Ahmad, Abu Dawud, Nasa'i, Shafi`i in his Musnad, and Bayhaqi in the Shu`ab.
I gather the above 2 hadiths as what you have described,
and the latter 2 being hadiths which goes to show that we as creations do not have the capacity to judge the person's eeman.
I hope someone knowledgeable can answer this, for there are many deviated sects going around at present in our time. Say, had we known they worship besides Allaah, in spite of calling themselves muslim, say what is the stand on this?
Wallahu a'lam