Lexbind fix

This pull request adds a test for and fixes #17.