I was also going to suggest you try linking the layers before you 'flatten' not sure if it will make a difference or not.