TRQ-2921. Fix a crash in the TORQUE API with a bad connection index.
TRQ-2921. Fix a compile error.