Fix a bug in std::fill_n where memset would end up being called in cases when it shouldn’t.

Reviewed by Howard.