Fix SDP generator bugs based on testing within the test harness