Well this code only gets executed while the map is loading, so I figured it would be better not to optimize it for speed, and save a few bytes of memory.
Actually it would be better to optimize it with PCVars because your keyvalue forward is called numerous times on map start.