fix for bug #27760: debug printf in backend.c and additional check for variant