Ticket #8947, thanks Maciej Florek