Bugfixes, particularly to code to ignore 'deleted' objects.