'let' appeared to break one of the builds so changed it to 'var'.
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.