1: \begin{proof}
2: The proof follows the standard argument in the holomorphic category. The difference of the two members of the equation is the intersection number of $E^{(1)}$ with the cycle defined by $g=0$. This cycle is homologous with that defined by a nearby level of $g$, which does not meet $E^{(1)}$ any more. The intersection number being invariant by homology, one gets the desired result.
3:
4: In order to make this argument rigorous, one has to work in convenient tubular neighborhoods of $E$ and to look at the cycles defined by the levels of $g$ in the homology of the tube relative to the boundary.
5: \end{proof}
6: