Fix for TFS Issue 1296219 (cloud service null reference)

Fix for issue #2319