Not sure what Modi's logic is... But, it is pretty clear that GOI is biased against UK labour and US Democrats, and doing this knowing full well, that the Democrats might control both houses of US congress, as well as capture the presidency in 2020.
Between, Republicans were historically more pro free trade, Trump turned this on its head.
Also, Democrats have historically had the hots for Pakistan, and more willing to sell them cutting edge weapons at subsidized rates. Democrats are more anti Russia, and would likely enforce CAATSA more strictly.
But, India has little leverage in US politics. So, I still dont see the point in GOI being partisan, and doubling down on baiting the Democrats.
Maybe, Modi feels India has gotten too close to the US for comfort, and wants to bring down the relationship a couple of notches... ? Also, RW are more provincial and dont concern themselves a lot about minority marginalization or universal values. Maybe Modi feels, that RWs would not hamper the Sangh's social project. ( But, there is no way that even RW in US would idly sit by, if Amit Shah realizes his wet dream of making 20 million Muslims stateless through NRC )
I am really out of ideas here, trying to see some gain from GOI behavior.