Fixed replace_s to also work for inserts (c_bra == c_ket)