fix value compare: closures were incorrectly collapsed