Automatic multi-insert detection