Reverted too far, adding back the "AllowInternals" for the .NET dll

Ready for merge (once successfully built)