See b/260945047. Also refactored the corresponding tests, which should future updates easier. This change should be deployed at or around 2023-02-15T16:00:00Z.