Fixes #2336.