Ok, I got it to work. Now he won't leave until dialog is over and the correct flag is issued. I just did a workaround so that I don't call two events in an IF/AND/THEN statement. Instead I check the dialog ending, then query the result of the flag as follows.
Now, inside the keyword editor it has:
ACTION SetLocalFlag("blacksmithFlag",1)
for the dialog trigger I want to flag. Then, in the story editor I use this function:
IF
DialogEnded("blacksmith2",_smithdiag)
AND
DialogGetLocalEvent(_smithdiag,"blacksmithFlag", 1)
THEN
CharacterMoveToTrigger(CHARACTER_Town_Blacksmith,TRIGGER_BlackSmithPointTrigger,0,"smithWalkBack");
which works. Now, if you change either of the 1's to 0's, you'll see it does not work. SO I believe the query function gets the value of "blacksmithFlag" and compares ot to the integer in the 3rd spot of the function.