fix `for/flvector', etc. unsafety

Closes PR 13675

Merge to v5.3.4