diff --git a/lib/compile.js b/lib/compile.js index 09618ee0d..c8a885e35 100644 --- a/lib/compile.js +++ b/lib/compile.js @@ -717,7 +717,7 @@ function lockedCheck(from, to, group) { to = fis.file.wrap(to).realpath; if (from === to) { return true; - } else if (group[to]) { + } else if (group[to] && group[to] !== from) { var prev = from; var msg = []; @@ -952,13 +952,13 @@ function postStandard(file) { } if (f && f.isFile()) { file.addLink(f.subpath); - var locked = lockedCheck(file, info.file); + var locked = lockedCheck(file, info.file, 'embed'); if (!locked) { - lock(file, info.file); + lock(file, f, 'embed'); f.addLink(file.subpath); f.isInline = true; exports(f); - unlock(f); + unlock(f, 'embed'); addDeps(file, f); copyInfo(f, file);