Merging fix from Flexo for #1109.