Add generative test to expose problem with `record-read-handler` and
hyphenated namespace segments
Fix `record-read-handler` to work with hyphenated namespace segments

The incoming type parameter is a class name. There is no way to
reliably determine the namespace name from the type name. Class name
foo_bar.Baz could map to the namespaces foo-bar.Baz or
foo_bar.Baz. This fix causes the function to work in the most common
case where it maps to foo-bar.Baz.