Added handling of link class applied to a link's direct container.