scripts: fix script interpreter used after register during load of script in python/perl/ruby/lua/guile plugins (bug #41345)