do not memoize leafs in shallow