Testcase generation fixes.