I don't see from reading the code when denom < 0.
However, I think this could be replaced by  n < 5 or add this as additional condition for cases that should be masked.

The same lines are missing in skewtest.