Little fix for _construct_diff_with_re (I don't know how it worked at all before). Some cleanups.