Fix invalid cast

This fixes an invalid class cast exception from Oid -> OidImpl. This patch avoids the exception by instantiating a new OidImpl from the dot-representation of the Oid.