Added duplicate ID selection collision handling.