Thanks ckarrie for the report and the initial patches, Flavio Curella for updating the patch, and Anssi Kääriäinen for testing. See ticket for other valuable contributors.