Fix loading of objects

During our work with ding2tal we've had problems loading objects. After going through the code, we've seen that the problem is that the id of the object maps to a NULL value, set in line 132, 136. The if statement does a strict comparison for a FALSE value, which means that the object is never loaded.

The problem occurs when trying to attach a ting_reference object, when the object isn't in the local cache.

The environment we've tested on is php 5.3.27.