[Fix] Fixes #176. Don't check for element specified by mainElement to be visible.

This is because there are some anchors that themselves have a height of 0, but their children have valid dimensions. Issue was seen with some specified main elements on FB.