Closed
Description
Courtesy of @JsonFreeman
This is just an oversight in the grammar, but the ModuleElement production does not go to AmbientDeclaration on the right side, which implies that an internal module cannot contain ambients. It needs to be added to the RHS.
Actually you need to add AmbientDeclaration, but not including AmbientExternalModuleDeclaration.