This would fix #2435. Might be worth to cover it by test.