Also remove the redundant casts which were hiding the error here. (cherry picked from commit 7081620a)
Attach a file by drag & drop or click to upload