fix #6826, recover better from expressions nested too deeply