Merged fixes for bugs 86719 and 86828 from trunk