I had a similar issue with a controller keyboard running midi thru into the A4. The MIDI out was to my soundcard.

With Abes open, playing a note on the keyboard, was sending a thru note to the A4, but the out, which was going back into the soundcard, was also sending the midi note info, which then went back into the controller keyboard MIDI in and then thru to the A4. Resulting in two midi notes with a tiny timing difference…

I’m still working out how I will fix this.