Improve clarity and speed of [25320] (merged as [25325]). Merges [25338] to 3.6.


git-svn-id: https://develop.svn.wordpress.org/branches/3.6@25339 602fd350-edb4-49c9-b593-d223f7449a82