fix(kernel): the hash code of expressions was not being used to compare them

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>