CA-130155: Port the fix of SCTX-1662 from trunk to clearwater-sp1-lcm

The fix of SCTX-1662(CA-125187) has been merged in trunk branch with pull request 1656.
https://github.com/xapi-project/xen-api/pull/1656

This pull request is to port the fix to clearwater-sp1-lcm branch to address SCTX-1744.