SDL_NumJoysticks() returning 0 under certain conditions

I have a question, it is not very simple.
The problem lays in the game controller detection by sdl2. Namely SDL_NumJoysticks() returns sometimes 0.
When I launch my .exe it detects controller no problem. But when I spawn my process as a child of a Magicka (game) process, it returns 0 for SDL_NumJoysticks().
What do?

For context, how I do it: I load a ddl into the game, which uses winapi (CreateProcessW call) to spawn a child process.

I also tried doing a stupid thing and making my .exe launch itself again, but this does not do anything to resolve SDL_NumJoysticks() returning 0.
It is like process tree is cursed or something.

My wild shot in the dark would be that because the game uses steam controllers abstraction and has xinput initialized and utilized, it “curses” all child processes.