A few fixes around checkin and handling of new nodes when protect_new_nodes is true