static if (isRandomAccessRange!(R) && hasLength!(R)) ref ElementType!(R) opIndex(uint n) { return _input[_input.length - n + 1]; } Shouldn't it be _input.length-(n+1) ?
Correct, thanks!