ignore 'target' directories in sub-projects
cherry-pick result collection fix from 2.5 to wip-2.6