Fix bug introduced when functions new_object() and session_object_exi… …
…sts(). The boolean variable is_object_new was not set and handled correctly.