Its an efficiency based rating system - not W/L based system. Its a predictive model, with more weight given to current results. It is not meant to rank top 5 teams. It is not meant to rank teams at all in the traditional manner that teams are ranked in polls.
Its good for assessing opponents of the top 10, and farther away we get from the top.
Teams were in a dead heat before the game (essentially we were about one point ahead) and they still are in a dead heat, and they are essentially one point ahead of us now.
Duke lost by 2, and when you factor in homecourt, they were slightly more efficient. Hence, they are now marginally ahead. There was no funny math.