[4.17 branch] Fix for JBTM-1609 

The commit here fixes the issue reported in https://issues.jboss.org/browse/JBTM-1609. It also fixes an issue where the same XAResourceRecord could potentially be attempted to deserialized more than once by the SerializableXAResourceDeserializer(s) which can lead to exceptions.