### Godot version

Godot 4.1-dev (ed63b9ea23)

### System information

Manjaro Gnome

### Issue description

`thread.start(test.bind(0))` prints the following error:

```
ERROR: Caller thread can't call this function in this node. Use call_deferred() or call_thread_group() instead.
   at: get_script (scene/main/node.cpp:3536)
```



### Steps to reproduce

```
func _ready() -> void:
	var thread := Thread.new()
	thread.start(test.bind(0))

func test(i: int) -> void:
	pass
```

### Minimal reproduction project

N/A
List<String> constants;
	::ClassDB::get_integer_constant_list(p_class, &constants, p_no_inheritance);
	PackedStringArray ret;
	ret.resize(constants.size());
	int idx = 0;
	for (const String &E : constants) {
		ret.set(idx++, E);
	}
	return ret;
}
bool ClassDB::class_has_integer_constant(const StringName &p_class, const StringName &p_name) const {
	bool success;
	::ClassDB::get_integer_constant(p_class, p_name, &success);
	return success;
}
int64_t ClassDB::class_get_integer_constant(const StringName &p_class, const StringName &p_name) const {
	bool found;
	int64_t c = ::ClassDB::get_integer_constant(p_class, p_name, &found);
	ERR_FAIL_COND_V(!found, 0);
	return c;
}
bool ClassDB::class_has_enum(const StringName &p_class, const StringName &p_name, bool p_no_inheritance) const {