In particular, this fixes a detrending bug in relation to the Occbin engine. Closes: #1827
mentioned in commit bdace4f9