A US-Philippine defence agreement aimed at countering China’s growing naval power in the South China Sea has run into political trouble in Manila, with the opposition and courts challenging its legitimacy.