Feature parity with built-in Position function

Correctly detects subsequent values repeated successively, and
correctly searches backwards from the start position when given a
negative occurrence value.