Fixes #2823.