Can't know what is happening without knowing the trainer ID of the currently loaded save file, and the ID of the Pokemon. If the Pokemon details matches the save file, then it should be handled by the OT, otherwise, should be the HT. Hence the message. Sharing trainer IDs across different versions results in incorrect handler flags because the game does not check the trainer Version, and it's a sign that the Pokemon or save file is not legitimate.