This patch should apply to current SVN codebase, but it will apply with 'fuzz' ... my patch stack is now eight deep, and I didn't realize I added this one on top of the one for 588313 (detect diversions).