Two errors corrected. The array_merge_recursive function didn't behave well for a DC name which could have be also interpreted as a numeric value. Two values on child devices were not correctly addressed which caused wrong output.
Merge remote-tracking branch 'upstream/master'
Merge pull request #272 from AndHam89/master

Two errors corrected and refactoring done.