Solidity : Unsafe type inference in the for-loop