Under pressure from Tamil Nadu, Manmohan Singh, the outgoing prime minister, refused to go to Sri Lanka in October last year to attend the Commonwealth summit. It was a perfect self-goal.
In contrast, British Prime Minister David Cameron, whose country is home to a very large and vocal Sri Lankan Tamil population, not only went to Colombo but also flew to Jaffna, the Tamil heartland.
If Tamil Nadu's politicians were to have their say, Rajapaksa should be kept away from Rashtrapati Bhavan when Modi takes oath as India's prime minister.
Reason? Rajapaksa and his military are to blame for the death of thousands of innocent Tamils during the end stages of the war that destroyed the Tamil Tigers in 2009.
No one disputes the horrors of that war; the atrocities committed by both the military and the LTTE have been well documented. But how will New Delhi's boycott of Rajapaksa help the Tamil community in Sri Lanka?
What if a self-righteous Pakistan decides to boycott Modi over the Gujarat riots -- or the deaths of all the Muslims in communal riots in India since 1947?
Indeed, why should India not shun Pakistan for promoting terrorism in this country that has claimed thousands of lives? Why host Nawaz Sharif?
India moved away years ago from the megaphone foreign policy it pursued in the 1980s - when New Delhi would publicly denounce Colombo over rights violations -- and then intervened militarily in Sri Lanka.
India's support to Sri Lanka against the now vanquished Liberation Tigers of Tamil Eelam (LTTE) in no way amounted to condoning all that went wrong during the war.
The Rajapaksa regime's refusal to come up with a credible political response to the Tamil political aspirations is one of the several problems that afflict Sri Lanka today.
India must engage with Sri Lanka - and its leadership - actively over a range of issues. This includes gently pushing Colombo towards a system in which Tamils feel at home and not as an oppressed minority.
The Tamil chief minister of Sri Lanka's northern province, C.V. Wigneswaran, should have accepted Rajapaksa's invitation to accompany the president to New Delhi.
Even if Wigneswaran is uncomfortable with the way things are in the Tamil region, he could have utilized the visit to brief the Indian leadership about his concerns - and would have got to know Modi at a personal level.
There was indeed a time when the Rajapaksa regime was keen to talk to Tamil Nadu politicians to see if they could influence the LTTE into taking a path of negotiations.
This was just before the war in Sri Lanka reached a stage where there was no turning back - and the LTTE went downhill.
But no one in Chennai was ready for the plunge. We know what happened. The LTTE was crushed and tens of thousands, primarily Tamils, were killed. A quarter century of fighting came to naught.
Now our Tamil politicians want Modi to act like them: shun Rajapaksa. It is good Modi is not going by their sermons.