Q:

Vakil 14.2.E: $\mathcal L \cong \mathcal O_X(\mathrm{div}(s))$ for $s$ a rational section.

I am working through Vakil's Ch. 14 (march2313 version) on invertible sheaves and am having trouble on 14.2.E.
The question (in notation to be defined) is this: how do I show that each point in the support of $D$ is contained in some set in $B$?
Let $X$ be a Noetherian normal scheme, $\mathcal L$ an invertible sheaf on $X$, and $s$ a rational section, $D = \mathrm{div}(s)$. This means that $s$ is an equivalence class of sections over open sets containing all of the associated points of $X$. We associate to $D$ a sheaf $\mathcal O_X(D)$ defined by 
$$\mathcal O_X(D)(U) = \{t\in K(X):\: \mathrm{div}\rvert_{U}(t)+D\geq 0\},$$ where $K(X)$ is the total quotient ring of $X$, which coincides with the function field if $X$ is irreducible.
Part of the exercise is to show that $B = \{\mathrm{open}\: U\subset X:\: \mathcal O(\mathrm{div}(s)) \rvert_U \cong \mathrm O_U \}$ is a base for the Zariski topology on X. On each such set it is easy to see that $\mathcal O_X(D)(U)\longrightarrow \mathcal O_X(U)\longrightarrow \mathcal L(U)$ defined by $t\longmapsto t\longmapsto ts$ is an isomorphism, so in the end we find that $\mathcal O_X(\mathrm{div}(s))\cong \mathcal L$ . 
The complement $U$ of (the support of) $D$ is such an open set; sections over $U$ are those $t\in K(X)$ having nonnegative valuation at every codimension 1 point contained in $U$. Since $X$ is normal, $\mathcal O_X(U)$ is normal, so Hartog's lemma gives that $$\mathcal O_X(U) = \bigcap_{q\in U, \mathrm{codim}(q)=1}\mathcal O_{X,q},$$ so we find that $t\in \mathcal O_X(U).$ Taking distinguished open sets in $U$ gives a basis in U, so we need only consider those points in the support of $D$.
Suppose $p\in D$. If $p$ lies is only one prime divisor $Y$ in $D$, then the complement $U$ of the other componenets is an open set over which the only constraint on sections of $\mathcal O_X(D)$ is that they satisfy $v_Y(t)+v_Y(s)\geq 0$ ($v_Y$ being the valuation on $\mathcal O_{X,Y}$), so I should be able to find an isomorphism of $\mathcal O_X(D)(U)\cong \mathcal O_X(U)$ gotten by multiplying by an appropriate power of a uniformizer in $\mathcal O_{X,Y}$, but I'm not sure how to make this go. For those $p$ contained in more than one irreducible component of $D$, things seem worse because it could be that $p$ generizes to two prime divisors where $s$ has different nonzero orders. So then I want to to inject into the direct product of the associated points...?
I hope I have made my points of confusion sufficiently clear.

A:

I did not know how to lift the obvious isomorphism $\mathcal O_X(D)_Y \cong \mathcal O_{X,Y}$ at a codimension-1 point $Y$ to an isomorphism of a neighborhood of $Y$.  Ultimately, it is possible to do this because the total ring of fractions gives a single realm for considering functions coming from different sources. 
Replace $X$ by one of its affine neighborhoods of $p.$ Since $X$ is regular in codimension 1, $\mathcal O_{X,Y}$ is a DVR. Any uniformizer $f_Y$ can be considered in $K(X).$ It can be shown that the prime Weil divisors of $X$ through $p$ correspond bijectively to inject into the prime Weil divisors of $Spec(\mathcal O_{X,p}),$ so $Y$ is the only component of the divisor of $f_Y$ considered as a function on $X$. Let $$U_Y := X\setminus \{\text{all components of $div(f)$ except $Y$}\}.$$ Then, letting $e_Y := v_Y(s),$ the open set $U := \bigcap_{Y\ni p} U_Y$ is a neighborhood of $p$ on which 
$$t\longmapsto t\prod_{Y\ni p}f_Y^{-e_Y}$$
is an isomorphism $\mathcal O_X(D)(U)\longrightarrow \mathcal O_X(U).$ From here it is straightforward to prove that in fact $\mathcal O_X(D)\rvert_U \cong \mathcal O_U$ for all $U$ in a base for the topology on $X$, and the rest of the exercise follows.

