Second language speakers often struggle to apply grammatical constraints such as subject–verb agreement. One hypothesis for this difficulty is that it results from problems suppressing syntactically unlicensed constituents in working memory. We investigated which properties of these constituents make them more likely to elicit errors: their grammatical distance to the subject head or their linear distance to the verb. We used double modifier constructions (e.g., the smell of the stables of the farmers), where the errors of native speakers are modulated by the linguistic relationships between the nouns in the subject phrase: second plural nouns, which are syntactically and semantically closer to the subject head, elicit more errors than third plural nouns, which are linearly closer to the verb (2nd-3rd-noun asymmetry). In order to dissociate between grammatical and linear distance, we compared embedded and coordinated modifiers, which were linearly identical but differed in grammatical distance. Using an attraction paradigm, we showed that German native speakers and proficient Russian speakers of German exhibited similar attraction rates and that their errors displayed a 2nd-3rd-noun asymmetry, which was more pronounced in embedded than in coordinated constructions. We suggest that both native and second language learners prioritize linguistic structure over linear distance in their agreement computations.