fix logging of unparsed elements

Parsing of elements is moved to a single function,
since that function can determine if an element is uncaught or not.

Otherwise everything that is not in both, elements and inner_els
would be reported as uncaught or not delegated.

Signed-off-by: Johannes Dewender <github@JonnyJD.net>