Fix #11330 (Composer legend can be smaller than its content)