'Check and repair' tool is rather designed for fixing database error.
I know. And strictly speaking it may not be a database error, since Gramps’ internal references are OK.
 
But OTOH, Gramps has built-in rules to avoid duplicate ID’s, and when we find an error there, we do create a bug report about that, so it’s serious enough for that.
If you want to check data, we can warn user via a new rule on 'Check data' utility? On this tool, there is a set of rules (like for filters).
Gramps can point out where there is maybe a problem on user's data, but user needs to valid and make the change.
H’m, programming wise, re-order ID’s may be the appropriate place to handle this, and maybe do some true re-ordering too, on users wish.
 
cheers,
 
Enno