Move do_action to correct location above ob_get_clean(). Closes #2105