Use depth (not owner) to check for root components

Fixes #557.