@@ -258,6 +258,10 @@ checkUnique borrowed ctxt env tm
258258 chkBinders env (Bind n b t)
259259 = do chkBinderName env n b
260260 chkBinders ((n, b) : env) t
261+ chkBinders env (binderTy b)
262+ case b of
263+ Let t v -> chkBinders env v
264+ _ -> return ()
261265 chkBinders env t = return ()
262266
263267 chkBinderName :: Env -> Name -> Binder Term ->
@@ -275,10 +279,6 @@ checkUnique borrowed ctxt env tm
275279 UType AllTypes -> do ns <- get
276280 put ((n, (Once, AllTypes)) : ns)
277281 _ -> return ()
278− chkBinders env (binderTy b)
279− case b of
280− Let t v -> chkBinders env v
281− _ -> return ()
282282
283283 chkName n
284284 = do ns <- get