The verse clearly states that the believers should not ask God's forgiveness for polytheist and idolaters.
This implies that they should not perform the prayer for them when they die, even though they be of their near relations.
When it has been made clear that an enemy of God has been damned, and will eternally abide in damnation and Hell, what is the use of wasting time on praying for him, and asking a forgiveness that will not be granted him?
Sent forth a green grass to your grave. You send it forward, for, no one will bring it afterwards.
Besides; asking forgiveness for the polytheists and heathens is a sign of love for them; and how should a true believer love a body who has deliberately rejected God?