Preparation for implementing a substitution function.
Fixed a comparison bug that sometimes killed polypaver when reporting
progress.