Make autotest code a bit more verbose.

A magic static bool variable was not easy to debug. Current approach is
easier to read