private static void checkDependencies(JcrNode node, List<String> paths, JcrWorkspace targetWorkspace,
Map<JcrNode, List<JcrNode>> result) {
// go through all properties
JcrPropertyIterator iterator = node.getProperties();
while (iterator.hasNext()) {
JcrProperty property = iterator.nextProperty();
// if it is a reference property
if (property.getType() == PropertyType.REFERENCE) {
// if the property has multiple values
if (property.getDefinition().isMultiple()) {