Rex Rammell loses court challenge