Bug 1015859 - waitForElement doesn't return element if it's not in the dom tree in the beginning

https://bugzilla.mozilla.org/show_bug.cgi?id=1015859