Fix #1099, remove in empty array optimization