In the expression 昨日のと同じ, the pronoun の more likely represents another noun than the modified noun, for instance 昨日のと同じ服 is for 昨日のデートと同じ服, and not 昨日の服と同じ服. This is applied to almost all ~と同じ, not just to 昨日と同じ, thus, 彼と同じ学校 is far more common than 彼のと同じ学校.