Fixes bugs in divide_recipe() to avoid unnecessary duplication of variables and ensure that the 'Datasets' section of the atomic recipe has the correct structure See merge request !103