[composer] Respect layer transparency when drawing legend items (fix #7890)