Bugfixes and improvements for the specification debugging stuff.