[Don't merge for M06] Refactor KernelTransaction to sort under WriteTransaction