I needed to exclude certain node types from the site map. They need to be excluded on the site map only as they must be accessible via their URLs and appear in the menu structure.

Check the attached patch.