Fixed 'Bug 17945 - Bad 'unnecessary cast' warning'.