Ensure expectNoDeprecation works in production mode.