Court stumbles upon 'interesting anomaly' in law on sodomy