Added fix to handle circumstance where sObject to be de-serialized is a custom object in a namespace.