Add a 'debug' option to mangle_properties and add a test that verifies it works as expected both with and without a cache passed as well.