I used that same code for HG. I got my SID: 62174.
Later on, after discovering that save files can't be uploaded to a computer for HGSS yet, I uploaded a Platinum file (that had a Sandshrew caught in Union Cave on HG on it). Instead of it having a SID of 62174, it's 31916.
I then decided to test it out. I created a Typhlosion with a SID of 62174. I transferred it back to HG. I battled something, and it gained a "boosted" amount of EXP, meaning it still hadn't originated from my game. I then altered the SID to 31916 and did the same thing. No boosted EXP.
So, I guess the code is just... wrong.