Fix IVY-1465 (performance issue from trunk)