In Samba 4 there exists a file named provision_templates.ldif under setup/. When I read the content intently, I noticed the line "primaryGroupID: 513" under "dn: CN=TemplateComputer,CN=Templates". Shouldn't the entry reference to the group "Domain Computers" with GID 515?
-r 24076 shows that we can't fix this with the templates. I think the right fix is in the SAMR server, so that's what I've put into -r 24080.