I believe it's using the last character that acted rather than the "closest" - it always seems to select the character that got the "killing blow" for me.

I'm guessing the trigger to start the post-fight conversion fires before the one to update the selected character.