Found this in the IXmlReader docs at msdn but it's also valid for XMLReader in PHP.
You should save the value of $isEmptyElement before processing attributes, or call moveToElement to make $isEmptyElement valid after processing attributes.
$isEmptyElement returns FALSE when XMLReader is positioned on an attribute node, even if attribute's parent element is empty.