Fix implementation of logical operators in gdt expressions