Fix lowess for constant inputs.

Fix with tests for #1798.
what's the difference to `test_flat` ?