#3710: avoid recursive compute

@phtaylor @pzion 

improve early exit on recursive compute