Fixes #2335.