Fixed #5863 (False positive: array index is used before limits check)