kernel: move mediatek flow offload refcount fix and fix a logic error