Avoid crash caused by missing "id" attribute
Use getNodeName() here too
Do not crash when handling dotted exception types; with tests.