patch: fix "patch at the beginning" testcase failure