fix(frontends/lean/elaborator): potential memory access violation
fix(frontends/lean/elaborator): potential memory access violation

Before this commit, the modified method would crash if caching in the
whnf procedure was disabled.

leanprover/lean,dselsam/lean,dselsam/lean,digama0/lean,fpvandoorn/lean,johoelzl/lean,Kha/lean,htzh/lean,eigengrau/lean,soonhokong/lean-windows,soonhokong/lean-osx,javra/lean,leodemoura/lean,fpvandoorn/lean2,Kha/lean,levnach/lean,leanprover-community/lean,htzh/lean,leodemoura/lean,soonhokong/lean,leodemoura/lean,digama0/lean,Kha/lean,fgdorais/lean,javra/lean,sp3ctum/lean,soonhokong/lean-osx,leodemoura/lean,levnach/lean,rlewis1988/lean,leanprover-community/lean,avigad/lean,dselsam/lean,fpvandoorn/lean2,javra/lean,leodemoura/lean,leanprover/lean,soonhokong/lean,soonhokong/lean,leanprover-community/lean,soonhokong/lean-windows,fpvandoorn/lean,c-cube/lean,rlewis1988/lean,leanprover/lean,leanprover/lean,avigad/lean,htzh/lean,leodemoura/lean,fpvandoorn/lean2,rlewis1988/lean,dselsam/lean,avigad/lean,Kha/lean,dselsam/lean,eigengrau/lean,eigengrau/lean,soonhokong/lean-osx,fpvandoorn/lean,fpvandoorn/lean,htzh/lean,johoelzl/lean,leanprover-community/lean,c-cube/lean,rlewis1988/lean,c-cube/lean,Kha/lean,fgdorais/lean,fgdorais/lean,levnach/lean,avigad/lean,eigengrau/lean,sp3ctum/lean,htzh/lean,fpvandoorn/lean,digama0/lean,leanprover/lean,johoelzl/lean,Kha/lean,johoelzl/lean,c-cube/lean,digama0/lean,UlrikBuchholtz/lean,UlrikBuchholtz/lean,UlrikBuchholtz/lean,levnach/lean,johoelzl/lean,javra/lean,fpvandoorn/lean2,rlewis1988/lean,digama0/lean,fpvandoorn/lean2,rlewis1988/lean,sp3ctum/lean,leanprover-community/lean,sp3ctum/lean,eigengrau/lean,fgdorais/lean,soonhokong/lean-osx,levnach/lean,avigad/lean,soonhokong/lean,javra/lean,avigad/lean,sp3ctum/lean,soonhokong/lean-osx,UlrikBuchholtz/lean,soonhokong/lean-windows,soonhokong/lean-windows,soonhokong/lean-windows,fgdorais/lean,soonhokong/lean,fpvandoorn/lean,fgdorais/lean,digama0/lean,c-cube/lean,leanprover/lean,UlrikBuchholtz/lean,leanprover-community/lean,johoelzl/lean,dselsam/lean