Worked around a very puzzling issue with Qt 5.1.1 (?) (closes #229).