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

Built from https://develop.svn.wordpress.org/branches/3.6@25339


git-svn-id: http://core.svn.wordpress.org/branches/3.6@25301 1a063a9b-81f0-0310-95a4-ce76da25c4cd