Revert 125968890307392f25f0b603aacc29c0958f198e and rewrite it so that things still work for non-register scenarios (e.g. using `register-ignore`).