global variables. Regression tests output was incorrect with this long-standing bug.
More modularity is needed.