Fixup for #2085. set isElement to false if getElement() throws.
Merge pull request #2116 from paymand/2085

Fixup for #2085. set isElement to false if getElement() throws.