Also add a C++ test for this bug