0d54aa9c02
The issue was caused by wrong sign check. It originally came from more optimized Cycles code where because of other reasons it wasn't visible yet. But in fact it should be solved there as well.