Restore structure to targets lost during nonrecursive refactor.
Merge pull request #1242 from pmienk/master

Restore structure to targets lost during nonrecursive refactor.