When you breaking with a renamed minecart as an entity, the game will not respond and crashes.
Step to Reproduce
1. Get an anvil and a minecart.
2. Rename the minecart to anything.
3. Place it down on a rail.
4. Break it.
Expected Result
Breaking it would not crash the game.
Observed Result
The game crashed.
Note: This also happens when you're attempting to save and exit the world, or trying to export the structure with a renamed minecart.
Looks to be fixed in 1.18.0.20.