These assertions had been removed in 34ba86706f and 7fe554b2a3, seemingly because they were referencing the wrong objects, and so they started failing when the checking of object types (as well as PK values) was introduced.
34ba86706f
7fe554b2a3