@Hotweatherisbad @meuon this is where I finally break and write unit tests...
It was to avoid these "what the..." moments that I started always using linting and type hinting on my Python code, and (quite commonly) writing tests (not that I do TDD, shudder).