Handle when manipulating root category which has a null parent (was 0 in core<=1.3.5)