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

@bootstraponline, @jlipps: The tests now pass with this fix.