repr: adds tests for new representation of Definitions, and fix a few bugs that tests unburried.