This problem is not with the Windows 2012 domain functional level. I am currently operating my Windows 2012 R2 servers in a Windows 2003 domain functional level which should work, but it doesn't due to this bug. The bug is related to the operating system itself and the fact it returns a blob of 52 bytes instead of 48 as with Windows 2008 server.
Here is a quote from the patch:
Digging into the problem it seems to be in the drsuapi IDL. The
DsBindInfo blob returned by the server is decoded in the IDL, based on
the blob length. For some reason, some servers are returning a 32 bytes
length blob, which is not decoded, so it falls into the default case and
python bindings crash.
Reviewing the documentation [MS-DRSR], it is possible the server not to
push the object GUID of the configuration NC, so I have added that case
and also the one to decode the blob returned by W2K12 R2 which is 52 bytes.
So regardless of the domain functional level, Windows 2012 R2 cannot be used unless this patch is applied.