Minor refactoring of the Debug builder

follow on to #559