Don't match ending '.' for terms that end in '.'

Fixes #10