Fixed regression causing variable layer heights to be ignored. #2136