Re-add autosetupmerge based on stackoverflow.com/a/22147540/1103543