Fix cast override regression on uri primitive.