Removed debug log from const_pow()
Implemented const folding of ternary op with undef select