Finishing up support for issue #1021 and #1022: serialized variables and return statements in traces.