Fix various minor diff'ing related errors;

deal with archetypes that use use at-codes that as both id code and value code.