Fix automatic downward directed graph constraint generation

Quick and dirty fix for #14.