The stream object (OBJ_TYPE_STREAM) was missing in the switch statement of the obj_base_ptr() function. This patch must be backported as far as 2.0.