Don't search for a hyperlink container beyond an inline root

Fixes issue #492.