If you want to analyse this intro you have to mind that there several relative keys of D major:
harmonic and melodic minor key and the Aeolian mode.
As there is no additional accidental to hear we are in Aeolian or D- major
As the beginning is in b - minor the harmony has a certain ambiguity and you can analyse it as
or as vi-iii6-IV7 D-major
So you are right: at bar 17 (~ min 1) the key is defintely D-major
As I startet to listen at this point (min:1) I identified the intro from the beginning in D major: Then it starts with the vi degree but already in the repetion of the first phrase there is a D as changing tone and tonality is fluctation to a tonic chord of D major. Also in bar 9 and 13 I was hearing a inversion of the subdominant of D.
5-8: bm-f#/A (or D/F#) G7 - f#/A (or A13)
13-16: G/b-A-G7-f#m/A (whereby the IV7 and V7 have additional chord tones as 9,11,13
bars 9 and 13 I hear quite as IV6 (1. inversion) of a subdominant-dominant cadence to D.
But both analyises will be chorrect.