extend history loading fix to deletions

Deleted objects need to be kept in the base of the history stack, too.

This also improves the respective unit tests.