Description
invFunc is optional and can be None. Instead of invFunc (the parameter) invReduceFunc (a local function) was checked for trueness (that is, not None, in this context). A local function is never None,
thus the case of invFunc=none (a common one when inverse reduction is not defined) is treated incorrectly, resulting in loss of data.