Fixed rare edge case in add/remove test.