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