examples/pipeline: fix out of bounds array access