switch headers + avoid duplicate definition
include config before testing macro
Merge pull request #2793 from remicollet/issue-non-free3

switch headers + avoid duplicate definition
Late state binding on hydration (cloneResultMap call)
Optimize late state binding on cloneResultMap