Merged from SVN - fixes for 11362, 12298, 12978, 13019, 12427, 12004, 9589, 12928