Developer wins court case against Surrey over townhouse appl