Bugfix/tst map

This was posted on the mailing list a while back, but sat around. If the tst_map matches on the first character but fails on the second character, the iterator position is not properly rolled back to the position original provided as an argument. This updates the test to catch the issue, and fixes the bug in tst_map