Fix distinct keyword on non-comparable type

Solves issue 1931
Also check if the functioncall is distinct ``node.isDistinct``