Agreement follows grammatical relationships, not the closest word. A long sentence can place a plural noun beside a singular verb without requiring plural agreement. Strip the sentence to its core, decide the needed form, then restore the modifiers and check that the meaning remains intact.
Reason through the task
Find the head of the subject phrase and its number. Prepositional phrases ordinarily modify that head rather than replace it. Check compound subjects separately, and inspect pronoun antecedents for number and reference. Match items in a parallel series by grammatical function: infinitives with infinitives, clauses with clauses. The point is to make equivalent elements visibly equivalent, while retaining exactly who performs each action and what each item means.
Worked example and a tempting error
Original example: “The collection of rare maps, including several coastal charts, are stored upstairs.” Collection is the singular subject; maps and charts lie inside modifying material. The correction is “The collection of rare maps, including several coastal charts, is stored upstairs.” “The collections … are stored” would also be grammatical but introduces multiple collections. A good edit fixes agreement without silently altering the number of things being described.
Try a different case
Transfer: “The team hopes to measure the current, compare the samples and recording the temperature.” The coordinated complements of hopes should match: “to measure the current, compare the samples and record the temperature.” The initial to can govern all three verbs. Changing only recording to records introduces a finite verb rather than the matching infinitive form. Parallelism depends on the sentence’s actual structure, not a visual similarity between endings.