#2059: fixed problem in piecewise polynomial covariance function in combination with dimension masking