well it looks like you are loading the light CR2s properly, from the dcraw command line. are you sure that when you integrated the master dark that the CR2s were read in as raw? the master dark in the background was debayered explicitly but of that doesn't mean the master dark was not already debayered. i think you can debayer a debayered image, does not make sense but does not generate an error either.