### Godot version

4.0 beta 10

### System information

Windows 10 

### Issue description

In my rss reader on windows, when the user switches between feed lists - that is, when a VBoxContainer has all its children removed and a new set re-added, the application crashes with:

USER ERROR: Condition "slot >= slot_max" is true. Returning: nullptr
   at: get_instance (./core/object/object.h:974)

This only happens on the windows version and only when that version is built in release mode. In an earlier beta (7 or 10 I am not sure) it was happening occasionally on the linux build too, but that no longer appears to be an issue. I was not able to find any information or other bug reports about this error.

### Steps to reproduce

I have no simple minimal reproduction available, but it is fairly constant in my current project. You can find the source here:
https://gitlab.com/gametheatre/poriferareader/Porifera

1. Build a release windows version of the project
2. Run the exported executable
3. After running the project, subscribe to two or more RSS feeds.
4. If it still has not crashed, switch back and forth between these feeds.

Because this appears to be an issue with the build system it is likely that it will be a major hassle to debug. Let me know if there is any help I can offer.

### Minimal reproduction project

As mentioned above it is consistently reproducible with this (non minimal) project: https://gitlab.com/gametheatre/poriferareader/Porifera

As a temporary workaround, only creating debug builds for windows solves this.
#ifdef DEBUG_ENABLED
		ERR_FAIL_NULL_MSG(ObjectDB::get_instance(ObjectID(data.object_id)), "Invalid Object id '" + uitos(data.object_id) + "', can't call method.");
#endif
		call_with_variant_args_ret(data.instance, data.method, p_arguments, p_argcount, r_return_value, r_call_error);
	}
	CallableCustomMethodPointerRet(T *p_instance, R (T::*p_method)(P...)) {
		memset(&data, 0, sizeof(Data)); 
		data.instance = p_instance;
#ifdef DEBUG_ENABLED
		data.object_id = p_instance->get_instance_id();
#endif
		data.method = p_method;
		_setup((uint32_t *)&data, sizeof(Data));
	}
};
template <class T, class R, class... P>
Callable create_custom_callable_function_pointer(T *p_instance,
#ifdef DEBUG_METHODS_ENABLED
		const char *p_func_text,
#endif
		R (T::*p_method)(P...)) {
	typedef CallableCustomMethodPointerRet<T, R, P...> CCMP; 
	CCMP *ccmp = memnew(CCMP(p_instance, p_method));
#ifdef DEBUG_METHODS_ENABLED
	ccmp->set_text(p_func_text + 1); 
#endif
	return Callable(ccmp);
}
template <class T, class R, class... P>
class CallableCustomMethodPointerRetC : public CallableCustomMethodPointerBase {