Do not use the alternative if/elseif/else syntax in `prepend_attachment()` introduced in [27622], as per kovshenin.

Fixes #27243.


Built from https://develop.svn.wordpress.org/trunk@27682


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