Fixed ExpandTerm so any failure during the recursion is propagated out, this is different but likely more correct behavior