Added catch in read_term to clean up global flags in case of error.
Authored by: dwarren 2019-02-06
Parent: [r9505]
Child: [r9507]