What triggers the first wāw → hamzah in Rule 7?

Miscellaneous Morphological Explanations: Eight Rules for Wāw, Yāʾ, Alif and Hamzah