Fix make_resource

Call add_resource before init_resource, so the resource is not marked
as changed, but as added. This just gets the internal old2new/new2old
data structures right. Apparently this bug has not produced visible
effects.