This makes the staticfiles tests 2.5 times faster. Backport of 2bb5b0e0 from master Backport of bd059e3f from master