Use depth (not owner) to check for root components

Fixes #557.
Merge remote-tracking branch 'spicyj/depth-not-owner'
Followup fix for lint