Regulator loses Westpac home loans case