atom: only perform xml:base based rewriting if base element exists (closes #761)