/setblock containers with slots containing items with
{BlockEntityData:...}don't have the NBT data, the items stack, and when placed, don't have any of the correct characteristics.
Duplication:
*run the following:
setblock ~ ~2 ~ dispenser 1 destroy {Items:[{id:command_block,Count:1,Slot:0,BlockEntityTag:{Command:"setblock 12 1 -12 command_block 1 destroy {Command:\"setblock ~ ~5 ~ grass\"}"}},{id:command_block,Count:1,Slot:1,BlockEntityTag:{Command:"setblock 12 1 -12 command_block 1 destroy {Command:\"setblock ~ ~5 ~ stone\"}"}},{id:command_block,Count:1,Slot:2,BlockEntityTag:{Command:"setblock 12 1 -12 command_block 1 destroy {Command:\"setblock ~ ~5 ~ planks\"}"}},{id:command_block,Count:1,Slot:3,BlockEntityTag:{Command:"setblock 12 1 -12 command_block 1 destroy {Command:\"setblock ~ ~5 ~ leaves\"}"}},{id:command_block,Count:1,Slot:4,BlockEntityTag:{Command:"setblock 12 1 -12 command_block 1 destroy {Command:\"setblock ~ ~5 ~ coal_ore\"}"}},{id:command_block,Count:1,Slot:5,BlockEntityTag:{Command:"setblock 12 1 -12 command_block 1 destroy {Command:\"setblock ~ ~5 ~ iron_ore\"}"}},{id:command_block,Count:1,Slot:6,BlockEntityTag:{Command:"setblock 12 1 -12 command_block 1 destroy {Command:\"setblock ~ ~5 ~ gold_ore\"}"}},{id:command_block,Count:1,Slot:7,BlockEntityTag:{Command:"setblock 12 1 -12 command_block 1 destroy {Command:\"setblock ~ ~5 ~ redstone_ore\"}"}},{id:command_block,Count:1,Slot:8,BlockEntityTag:{Command:"setblock 12 1 -12 command_block 1 destroy {Command:\"setblock ~ ~5 ~ diamond_ore\"}"}}]}