fix #6938, not treating assigned variables inside let as local