Even if it was 501cc from the factory it would not be UAS legal. If you read the rulebook closer you'll see that the engine has to be 500cc's or less from the factory and then it can be up to 510cc to account for wear. At least I think it says that. Take a look.
But, the KTM 520 is an awesome off-road bike. I regretfully passed up an opportunity to buy one from a buddy of mine recently. That thing was a dream ride. Controllable power and plenty of it. Not as heavy as you would expect, either.
But really, a 450 is PLENTY so I would suggest that route. Even the KTM 350 is plenty of power, from what I've heard/read.
* I'm riding a Honda CRF450X now and LOVE it! Maybe when the bike gets tired the engine will find it's way to a kart, electric start and all.
