Fix https://core.trac.wordpress.org/ticket/28268.
Fix https://core.trac.wordpress.org/ticket/28258.
Fix https://core.trac.wordpress.org/ticket/28266.