fix a bug about not generating AccessPath given a StaticElem and a FieldElem, which induces a stack overflow because of recursive calls