I feel the differences in d-max between glossy and matte papers are more dependent on the lighting and viewing conditions, rather than whether or not the print is behind glass.
The d-max differences are substantial under some lighting conditions (e.g., a gallery spot placed on the ceiling and angled at roughly 30 degrees from the wall, with little other ambient illumination), whereas they are much less significant in diffuse lighting conditions (e.g., lots of diffused light coming from windows, bouncing off walls, etc.).
This is to be expected, given the very nature of these surfaces: a glossy surface is, well, mirror-like and reflective by definition and hence most of the incident light will be reflected in a particular direction (basic geometric physics). In contrast, a matte surface is diffuse and will scatter light roughly equally (on average) in all directions.
There are even some cases where the lighting and viewing angles are such that the glossy print has a much weaker black than the matte print. This happens when the glare or sheen of the surface gets in the way ... so you end up not really seeing the image at all!