Fix memory leak in Dict.remove.

The entry was previously just overwritten now it is freed

Small fixes by Albert oo

Bug #84607