Highly experimental fix for this committed in [82ce90f91c]. Should get a lot more testing before going into trunk
<p>Feedback welcome.