Break inner loop when elem is in place