Don't re-enable history uselessly.
Don't re-enable history uselessly.

Also move an xmlFree() right before a return so we're consistent and
know that we're safe right away.

levaidaniel/kc,levaidaniel/kc,levaidaniel/kc