OK, solved. I've split the functions because Ton asked me tons of times to isolate the multiview from the rest of blender code. But in this case it should be fine.