[MRG] fix regression in find_all_primitives