It can be fixed in three ways:
comment_cashout_object when archiving a comment - if it is present, it means we are before cashout (in current reality). It is bad, because it wastes time on looking for objects to avoid situation that will never happen in real lifeon_fork_switch() event to comments_handler interface and call it near notify_switch_fork(). It basically allows to introduce undo where it is now missing - remove entries in ready-to-migrate map for blocks past bottom of fork switch (top block common to both chain realities). The main drawback of that solution is that the unit test we have now would still be failing, because it only emulates fork switches, does not actually execute them. Not the valid reason to not consider that solution, I know.
RE: Comment archive - for node operators and technical