improved checking on whether a scml should be recompiled