pngdec/filter: dont access out of array elements at the end