Fix #1794: don't take cached populated if array length has changed