Ignore invisible elements earlier on

Also add the element to the exception for better hope of debugging