ksm: remove redundancies when merging page