Fix bug in PR #1187

After merging PR #1187 I discovered that it contained a bug in the order
in which items were resolved. I have made this follow up commit to fix
that.
fix two failing XmlTest cases, possibly related to fix for #1184;
Merge pull request #1188 from ashnazg/xmlTestFailures

fix two failing XmlTest cases, possibly related to fix for #1184;
Corrected docblock vars
Merge pull request #1189 from siad007/patch-10

Corrected docblock vars