[backport] Fix for SI-6154, VerifyError originating in uncurry.

Lhs still might be an Ident.  Miguel did all the work,
I just wrote it down in code form.
(cherry picked from commit 48f8235822a2a100d6c4e8d3d7349df565ac6d40)

Backport of #1021 

Review by @magarciaEPFL