Fixing infinite iteration issue in `util.platforms`.