If the wetness on the head was such that it transfers to the hand and leads to wiping the feet with that wetness, then this invalidates the wudhu, since it is obligatory to wipe the feet with the wetness of the wudhu. If the wetness on the head was such that it does not transfer to the hands when wiping the head, then there is no problem in wiping the head in this case. Therefore, it is better to dry the head before the wudhu.