Added optional header copying for derivative