Currently register looks like:
private static <T> void register(Map<T, T> substitutions, T annotated, T original, T target) {
if (annotated != null) {
guarantee(!substitutions.containsKey(annotated) || substitutions.get(annotated) == original || substitutions.get(annotated) == target, "Already registered: %s", annotated);
substitutions.put(annotated, target);
}
...
}
The output message only indicates the substitution is already registered but not what is causing the conflict. This means the only way for the user to find out is to attach a debugger and set a breakpoint at this line.
The error message should include more information about the two substitutions that conflict so that the user can potentially take appropriate action to remove one of them.