A fix for this was first attempted at Bug 25968 but was reverted
Sorry I'm not sure what I was looking at... this clearly already works in upstream!