This is only if there are combinations added, so a little strange.
While debugging the code I found that by inserting
around the $HOOK_PRODUCT_OOS paragraph, right after < ! - - Out of stock hook - - >, the behaviour returns to normal.
(spaces added so as the code won't be interpreted as code...)