Problem
Let $S$ be a homogeneous coordinate ring of a projective variety that is non-singular in codimension $1$ (i.e. all local rings of dimension 1 are DVR's), $\mathfrak p = (x_0, ..., x_n)$ and let $K$ be the field of fractions of $S$. Is it true that:
$$\bigcap_{\mathfrak{q}} S_{\mathfrak q}^{\times} = \{ f \cdot g : \, f \in S_{\mathfrak p}^{\times}, \, g \text{ - homogeneous element of } K \} \qquad (*)$$
where the intersection is taken over all height 1 non-homogeneous prime ideals $\mathfrak{q}$ contained in $\mathfrak{p}$?
Remarks
A non-homogeneous prime ideal of height 1 cannot contain any non-zero homogeneous elements (cf. this topic), thus the RHS is contained in the LHS.
It's easy to prove this when S is a UFD. If h belongs to LHS, then any non-homogeneous irreducible polynomial f in its factorisation doesn't belong to $\mathfrak p$ (otherwise $h \not \in S_{\mathfrak q}^{\times}$ for $\mathfrak q = (f)$)
Motivation
I'm currently working on the Exercise II.6.3 (d) from Hartshorne's Algebraic Geometry:
Let X be an affine cone of a projective variety V, that is of dimension $\ge 1$ and nonsingular in codimension 1. Let $P = (0, 0, ..., 0)$ be the vertex of X. Prove that the restriction $$\operatorname{Cl}(X) \to \operatorname{Cl}(\operatorname{Spec}(\mathcal{O}_P))$$ is an isomorphism.
The surjectivity is immediate. In order to show the injectivity, I tried to use a previous part of the exercise - we know that $Cl(V) \to Cl(X)$ is a surjection with kernel $\langle \operatorname{div}(f) \rangle \cong \mathbb Z$, where $f$ is any homogeneous degree one polynomial such that $V \not \subset \{f = 0\}$. Therefore it suffices to show that $$\ker \bigg(\operatorname{Cl}(V) \to \operatorname{Cl}(\operatorname{Spec}(\mathcal O_P)) \bigg) = \langle \operatorname{div}(f) \rangle$$
The equality $(*)$ would imply that any divisor from $\operatorname{Div}(V)$ that is principal in $\operatorname{Div}(\operatorname{Spec}(\mathcal O_P))$ is actually of the form $\operatorname{div}(g)$ for $g$ - a homogeneous element of degree d. Finally, $$\operatorname{div}(g) = \operatorname{div} \left(\frac{g}{f^d} \right) + d \cdot \operatorname{div}(f) \sim d \cdot \operatorname{div}(f)$$ for any f as above.
I will appreciate any hints regarding the problem with the intersection and (in case $(*)$ is not true) the problem from Hartshorne.