bug fix: outputting bogus foreign key definitions at the top

addresses @tovodeverett’s report in #188