Rescue ctxFromBindings for aliased case

Use it in the test suite, just like for the unaliased machinery.
This is cherry-picked from 4e0fc1726ab4abf1326ea61ae5225f0bb5167707.