Wconversion: fix #1578

I think it's a good pattern to have an assertion before such a cast; you can see that it's safe at a glance. Maybe similar to having `//FALLTHROUGH` comments in a `switch`/`case` without a `break`.