I actually can’t manage to duplicate this. If a cart is in the door then the door doesn’t actually close, regardless of if you give the close command or not.
That said I’ve got a PR up that implements a sanity check for this, so while it won’t stop you from getting stuff stuck in walls, it should at least stop you from using it to walk through them.