To answer previous question, the black stuff is emergency leak spray which we put on in desperation. The day after we'd done it the roofer came back to redo part of the flashing, some of which is shown in the photos, so we never got to find out if it stopped the leak.
When the new roof was...