Add isUsedOutsideOfBlock function