The code is doing that but it's more a case of checking for either rather than both.  It'll prioritise the default value from output over the one from channel if both are present though (as it can't use both).