Stop at BR tags when moving up the heirarchy

DRQS 41811216
When moving up the heirarchy looking for a non-inlined element, stop when we
encounter a BR tag, because although the BR is inline, it marks the start of a
paragraph, so we should not cross it.