[backport] Test case for "not a class" crasher in live variable

Works on the 2.10.x branch, so just backprting the test.

Cherry picked from 6f6546ebfc26564843621e79d840209a5103d3c8.
0.9.0-M6
0.9.0-SNAPSHOT