register-api: Fix equals method generation.