Make get_positive_index accept indexes greater than the stack.

Necessary to handle correctly missing or optional parameters of
functions.
Fixes the assertion error of issue #219.