Fixed more complex undef cases in freduce