Small performance tweak to HTML serializer