Unbreak DEBUG_MALLOC & CHECK_MEMORY, now everything is accounted for.
Fix up the test build process.