Support for dynamic_mappings

The support for dynamic mappings was broken, so I added support back to
it.