Add FFPatcher unit tests and fix a weird patch mismatch