Fixed failed unit tests. Also, merged missing changes for TRQ-1461.
Merge branch '4.1-dev' of https://github.com/adaptivecomputing/torque into 4.1-dev