Fix handling of dependencies introduced by UNWIND