Football contracts can be very convoluted, and I imagine the latter is exactly what Spurs have agreed to. I imagine it's incerted so if he goes on a free somewhere from Spurs, Pat's can still get part of a later transfer fee.
Spurs in the efforts to sign a talented young player among competition have probably thought that, if he does well they'll get good money from him for any initial sale anyway, and if he does go for free or small money, a following transfer fee will likely also be free or small money.