Fixed a bug resulting in infinite loops when searching for pseudo-Anosovs.