Test for #3387. Not very reliable, any ideas how to improve this?