Add bugs from upstream to fix a test case.