It does not matter if a duchy switch by a duke is friendly in an allegiance change. Only between BOTH rulers.
And I believe it has been made perfectly clear that if anything, the switch has caused massive animosity between my character and just about everyone involved. Particularly the ruler of Luria Nova.