The second definition (for RIPS 2.0 transacción grouping) was never called but silently overrode the CMXC ventas grouper, causing grupos_vta to always be empty (values were dicts, not lists, so isinstance(v, list) was False). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>