Issue #3117410 by jungle, longwave, alexpott, andypost, Kristen Pol, daffie: Use an optimised autoloader in testing (cherry picked from commit 832a4185)