It might make sense to set the readBase to null for matches, e.g. readBase = null.toInstanceOf[Base]

There no reason to encode a base when it's identical to the reference, right?