Add some debugging helpers and two tests that currently fail.