Fixes #4984.