Fix #1146 by keeping result of outline view delegate method within range of array.