Fix bug in sysconfig copy logic