Missing check for empty array could trigger warning (#965)