### 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)

List<Node *> stray_instances;
#define NODE_FROM_ID(p_name, p_id)                      \
	Node *p_name;                                       \
	if (p_id & FLAG_ID_IS_PATH) {                       \
		NodePath np = node_paths[p_id & FLAG_MASK];     \
		p_name = ret_nodes[0]->get_node_or_null(np);    \
	} else {                                            \
		ERR_FAIL_INDEX_V(p_id &FLAG_MASK, nc, nullptr); \
		p_name = ret_nodes[p_id & FLAG_MASK];           \
	}
	int nc = nodes.size();
	ERR_FAIL_COND_V(nc == 0, nullptr);
	const StringName *snames = nullptr;
	int sname_count = names.size();
	if (sname_count) {
		snames = &names[0];
	}
	const Variant *props = nullptr;
	int prop_count = variants.size();
	if (prop_count) {
		props = &variants[0];
	}
	
	const NodeData *nd = &nodes[0];
	Node **ret_nodes = (Node **)alloca(sizeof(Node *) * nc);
	bool gen_node_path_cache = p_edit_state != GEN_EDIT_STATE_DISABLED && node_path_cache.is_empty();
	HashMap<Ref<Resource>, Ref<Resource>> resources_local_to_scene;
	LocalVector<DeferredNodePathProperties> deferred_node_paths;
	for (int i = 0; i < nc; i++) {