Turning off multiple PWM LED's in Zephyr

I have a custom board with 8 LED's and I use pwm API led_on(), led_off, led_blink() etc, to turn them on, set brightness and blink and everything works fine except one case

When I have more than 1 LED's blinking I cannot turn them off

The reason is this block of code in SDK\zephyr\drivers\pwm\pwm_nrfx.c, function  pwm_period_check_and_set()

/* If any other channel (other than the one being configured) is set up
     * with a non-zero pulse cycle, the period that is currently set cannot
     * be changed, as this would influence the output for this channel.
     */
    for (i = 0; i < NRF_PWM_CHANNEL_COUNT; ++i) {
        if (i != channel) {
            uint16_t channel_pulse_cycle =
                data->current[i]
                & PWM_NRFX_CH_PULSE_CYCLES_MASK;
            if (channel_pulse_cycle > 0) {
                LOG_ERR("Incompatible period.");
                return -EINVAL;
            }
        }
    }
When multiple LED's are blinking the expression evaluates to true and the code returns -EINVAL and the LED's are not turned off
If I comment out that code block I can turn off multiple blinking LED's 
Any reason why this limitation? It seems that the code should detect the case where LED's are be turned off i.e their brightness is set to zero and allow that
Any workaround?
Thanks
PS
SDK version 1.9.1
Related