Fix tests broken on last "optimization" commit