Fix broken eventlisten and small refactor.
Catch rendering issues.

Catch and warn on rendering issues in top files. Closes #8799.
Merge pull request #12990 from gtmanfred/2014.1

Fix broken eventlisten and small refactor and catch rendering issues