Add extra checks in XCache-calls to prevent fatals