idnode: ensure that idnode_insert return value is checked on all places