Introduced maybe-abort-on-incompatible-id, plus some code cleanup