I was able to hunt down the issue. The problem is in python-nav-end-of-block where there is an implicit assumption that python-nav-end-of-statement always makes forward progress, which is violated when the buffer contains e.g. a single quote. I have attached a patch the resolves this issue but there may be other lurking issues due to the removal of cl-assert because there are now all sorts of code paths that will run that never ran before because they would hit that assertion and bail out, usually all the way back to the top.