Change deprecated FlatBackground to CalculateFlatBackground.