Setting GatewayEndpoints on VPC object in AWS CDK results in NullReferenceException

I am trying to make an S3 GatewayEndpoint when I create my VPC using the Csharp version of the CDK. But when I use the below code, it throws an error "Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object."

            var vpc = new Vpc(this, "TESTCDK", new VpcProps
            {

                Cidr = "192.168.0.0/16",
                GatewayEndpoints =
                {
                    { "S3", new GatewayVpcEndpointOptions { Service = GatewayVpcEndpointAwsService.S3 } }
                }
            });

I can do the following, and it works fine...

vpc.AddGatewayEndpoint("s3", new GatewayVpcEndpointOptions { Service = GatewayVpcEndpointAwsService.S3 });

Just trying to understand if I'm doing something wrong, or if this is a bug.