parsing: make balance assertions more robust with different precisions (#119)

Also note another issue.