Add test for duplicate definition of promise handles

Promise handles should allow the use of variables without triggering duplicate
handle errors