Fixes https://github.com/pulumi/pulumi/issues/12207 Added some tests for this, which should eventually become a matrix test to ensure we check every language returns the expected error for this.