incorporate fix from r209227 instead