Alternate solution for #54, take into account parent elements w/out gaps