You said "correct the "search" for modprobe to properly figure out whether it's available from PATH." and looks like now it fails at strdup(getenv("PATH"));
You said "correct the "search" for modprobe to properly figure out whether it's available from PATH." and looks like now it fails at strdup( getenv( "PATH") );