John,
The MSH-10 content of an HL/7 message in and of itself will not cause messages to queue Pending in the Engine.
What may be happening is the receiving system is not acknowledging or the duplicate MSH-10 causes the receiving system to NAK the message and you are not handling that properly.
email me and I will email you a Tcl proc to manage the MSH-10 in an Xlate.
Jim Kosloskey
email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 60 years IT – old fart.