Add protection around XS1_RES_TYPE_LOCK define