Add 'Map Object' footers to Directive and Program trees

* Fixed by Surender Kodam <surenderk@google.com>
Merge pull request #1038 from reciprocity/feature/surender-add-object-fix

Add 'Map Object' footers to Directive and Program trees