A bug that probably would have gone unnoticed as it has no material effect (except perhaps a very tiny impact on load times), but this came to light while debugging another matter. Leaving this here to come back to later.
Fixed in 63d9cde (master) / ccb6e40 (V12.10 branch).