Fix for #3449
Regression test for #3449
Fix and regression test for #3444
Merge branch 'daniel_3449' into v1.15.x