Set detectionOnly flag for DetectionOnlyElements