Fixes #2851.