34065: following an "if" condition, do not test lastval for ERR_EXIT until a new command is run

Includes unposted regression tests.
34064: assignment before command replaces array with export even when KSH_ARRAYS