isl_stride.c: detect_stride: improve error handling