bugfix commit: object removal from treeset doesn't work sometimes,
fallback to iterator based removal