Fix python counting by handling case start and end are same characters.
Fix python counting by handling case start and end are same characters.

We were assuming if you saw the start of comment marker, you could
safely assume you were in a comment.  However, with python, we treat
''' as both start and end character for comments, so we need some
additional checks.

cgag/loc,cgag/loc