Government defeat on Gurkhas raises wider questions about rights