Added a condition which prevents adding height more than once

See issue https://github.com/highslide-software/adapt-chart-to-legend/issues/2)