I have recently been asked on a number of occasions regarding apparent exceptions to the אהוי rule which is that if a word ends with one of those letters, it will remove an expected דגש at the beginning of the next word. This is provided that the first word is connected to the second by means of a טעם משרת such as a מרכא, rather than a pausal note like an אתנחתא or טפחא.
The first example was in ויצא:
ל:טז ...וַתֹּ֨אמֶר֙ אֵלַ֣י תָּב֔וֹאThe י does not remove the דגש from the תּ even though it has a מונח which functions as a משרת.
Another example on which this question was raised was in אחרי מות:
יח:ה ...וָחַ֣י בָּהֶ֑םAgain, the דגש remains in the בּ.
This phenomenon is interestingly observed in בחוקתי. The first mention of the word בחוקתי is on a טפחא which is a מפסיק anyway. But when it is mentioned in the negative portion, we find:
כו:טו וְאִם־בְּחֻקֹּתַ֣י תִּמְאָ֔סוּThe מונח is a משרת but the תּ keeps its דגש.
It is important to forget about the actual letters for a moment. The essence of this rule is that it is applied when the first word ends with a vowel. This best way to understand this apparent anomaly is to observe a similar paradigm we find the English language with the letter Y. It can function as a consonant, as in yes or year, but can also be used as a vowel, as in the word gym or psychology. When the י extends a vowel sound, which would seem to be only after a צירי or חיריק, it functions as a vowel. However, after any other vowel, the function of the י is clearly a consonant, closing the syllable. Therefore, the אהוי rule would not apply.
(Now, this applies to צירי and חיריק because they both end with a י sound. That is why the י is said to extend or fill the vowel. If one pronounces a חולם "oy," shouldn't it apply there, too, whereas if you pronounce it "oh," it would not. As per the comments below, דברים ד:ח וּמִי֙ גּ֣וֹי גָּד֔וֹל is a good example. If this theory is correct it would prove the "oy" pronunciation to be incorrect. But I'm not fully convinced myself.)