fixed a defect that caused local variables to be updated incorrectly when renaming a field. (Issue #48)