Below is the original Cause and Solution to the issue. The above Cause and Solution has been updated and should normally be used.
CAUSE
There is a known issue where 2509007 does not install correctly if either 977203 or 977384 are installed at the same time via the PATCH= option of CCMSetup.exe. If 2509007 is installed at the same time as 977203 or 977384, after the CCMSetup completes, under the "Components" tab of the ConfigMgr 2007 control panel the "ConfigMgr Software Updates Agent" will show as being updated to version 4.0.6487.2188. However, inspecting the DLL that 2509007 is supposed to replace, Updateshandler.dll, reveals that it has not been replaced and is at version 4.0.6487.2000 instead of version 4.0.6487.2188.
Please note that 977203 is rolled into 977384. This is the reason why the issue occurs when 2509007 is attempted to be installed with either 977203 or 977384.
SOLUTION
If another hotfix is installed in between 977203/977384 and 2509007, and if the hotfixes are installed in the order that they were released, then 2509007 installs correctly. For example, if 2263826 (an Asset Intelligence hotfix) is installed in between 977203/977384 and 2509007, then 2509007 installs correctly.
An example command line for the "Setup Windows and ConfigMgr" task would be:
PATCH="C:\_SMSTaskSequence\OSD\<Package_ID>\i386\hotfix\KB977384\SCCM2007AC-SP2-KB977384-x86-enu.msp";"C:\_SMSTaskSequence\OSD\<Package_ID>\i386\hotfix\KB2263826\SCCM2007AC-SP2-KB2261172-x86-enu.msp";"C:\_SMSTaskSequence\OSD\<Package_ID>\i386\hotfix\KB2509007\SCCM2007AC-SP2-KB2509007-x86-enu.msp"
or
PATCH="C:\_SMSTaskSequence\OSD\<Package_ID>\i386\hotfix\KB977203\SCCM2007AC-SP2-KB977203-x86.msp";"C:\_SMSTaskSequence\OSD\<Package_ID>\i386\hotfix\KB2263826\SCCM2007AC-SP2-KB2261172-x86-enu.msp";"C:\_SMSTaskSequence\OSD\<Package_ID>\i386\hotfix\KB2509007\SCCM2007AC-SP2-KB2509007-x86-enu.msp"
where <Package_ID> is the Package ID of the ConfigMgr 2007 client install package. Do not include the brackets (<>) as part of the Package ID. Please note that the KB number (2261172) noted on the MSP file for 2263826 is different than the actual KB number (2263826) of the article.
The above paths may need to be modified if the Task Sequence cache folder (_SMSTaskSequence) resides on a drive other than C:. The Task Sequence cache folder will usually reside on the drive or partition with the largest amount of free space. It is not recommended to use the variable %_SMSTSMDataPath% as part of the path. This variable initially evaluates while in WinPE and its value can change once the Task Sequence boots into the full OS. This may cause the paths to become invalid.