have a look at Cramer's Essentials of Computational Chemistry in the basis set chapter and under functional forms. There exist canonical linear combinations of these: wikipedia
You are absolutely correct and this is a known issue (but I realize now not documented limitation!) that I was planning to address by implementing the sph<-->cart transformations.
In
basis.py
it looks a bit like you are adding linearly dependent basis functions for $l>1$ by explicitly adding all cartesian sphhave a look at Cramer's Essentials of Computational Chemistry in the basis set chapter and under functional forms. There exist canonical linear combinations of these: wikipedia
You can find the corresponding coefficients here: https://github.com/sunqm/libcint/blob/master/src/cart2sph.c
This might not be an issue for direct minimization but could become problematic in SCF optimization. not sure, though :)