Legend: Also calc the bbox of the legend when the frame is not drawn. (1.2.x)

This should fix #1586