### Godot version

d01ac9c73

### System information

ArchLinux x11

### Issue description

Signal with unbinds[^1] fails to emit in exported project.

[^1]: ![image](https://user-images.githubusercontent.com/70787919/215381688-1df57b26-2ed5-4473-a9dd-54d9c2228567.png)


### Steps to reproduce

- open mrp
- run in editor
- `it worked!` is printed
- export project
- run executable
-  
```c++
ERROR: Error calling from signal 'sig' to callable: 'Node::_on_sig': Method expected 0 arguments, but called with 1.
   at: emit_signalp (core/object/object.cpp:1058)
```

### Minimal reproduction project

[bug.zip](https://github.com/godotengine/godot/files/10531944/bug.zip)

if (base_scene_idx >= 0) {
		Ref<PackedScene> ps = variants[base_scene_idx];
		if (ps.is_valid()) {
			return ps->get_state();
		}
	}
	return Ref<SceneState>();
}
void SceneState::update_instance_resource(String p_path, Ref<PackedScene> p_packed_scene) {
	ERR_FAIL_COND(p_packed_scene.is_null());
	for (const NodeData &nd : nodes) {
		if (nd.instance >= 0) {
			if (!(nd.instance & FLAG_INSTANCE_IS_PLACEHOLDER)) {
				int instance_id = nd.instance & FLAG_MASK;
				Ref<PackedScene> original_packed_scene = variants[instance_id];
				if (original_packed_scene.is_valid()) {
					if (original_packed_scene->get_path() == p_path) {
						variants.remove_at(instance_id);
						variants.insert(instance_id, p_packed_scene);
					}
				}
			}
		}
	}
}
int SceneState::find_node_by_path(const NodePath &p_node) const {