Fixed bug in get_record where undoing of substitutions was assigned to wrong thing.