Fixed ensure semantics and accompanied test.
Merge pull request #276 from herby/ensure-semantic-fix

`[3] ensure: [4]` should return 3, not 4