Doing a second PhD in different field instead of a Habilitation I just started a 3-4 year Post-Doc position in Department A, to work on a topic on the border between two fields on which they also work in Department B. 

In some European countries the usual situation is to do a Habilitation in A. 
However, theoretically it is also possible to get payed by department A, and working on projects for A, but doing a second PhD department B as an external PhD candidate (as if i where in an external research institute), in stead of doing a Habilitation in A.  Doing a "external" PhD, at an other place than the supervising Professor is quite common in Germany, Italy and a few other EU countries. But only if the other place is a research institute or company, doing that in another university group, or university is very uncommon/rare, especially when it is about doing a second PhD.
I am not easily persuaded by uncommon/rare by itself, so i would like to know the pros and cons of taking this unusual path? 

Honestly only see more advantages (more collaborators, shared expertise) especially for topics that are on the border between two fields. A Habilitation can easily be waved if you have enough publications. It seems to me that a second PhD in B will later make it easier to change fields to B, beyond only the topics on the border between A and B. On the other hand i do not know any people who did something like this. And i can not really predict the consequences or reaction of such a unconventional route. And i also do not want to freak out my new boss by mentioning this idea, if the majority of you would consider it as very inappropriate. 

What are the pros and cons of extending your research field by doing a second PhD in another direction stead of deepening while doing a Habilitation in the same field?

EDIT: The current Position is in Germany. Although i would be interested in staying in Germany, i would also like to hear about perspectives on this for  other countries. That also makes the value of the question more general.
As has been covered in other questions e.g. Is doing two PhDs a good path? or After PhD in Aerospace Engineering, could I be admitted into a top university for a second PhD in Computer Science?, there is rarely a need to pursue a second PhD to change fields. Once you have acquired the basic research competence, you can shift fields at any point in your career (as indeed you are already doing by publishing in a CS field).

Moreover, the volume of research required for a PhD thesis and a Habilitation is quite similar. Rather than going back and doing a second PhD, would it be possible to start pursuing more collaborations with the CS department and publishing CS research, so as to eventually obtain your habilitation in CS? Or interdisciplinarily with research from both fields, if you would like to keep your options open?