Revert "walking back the parent:item items, and so re-simplifying the parsing code"

This reverts commit 1861626b1a3a8e39cde8bb5d21ec7b2859d233fe.