protected LocationReferenceEnvironment getParentEnvironment() {
		if (this.parent == null)
			return new ActivityLocationReferenceEnvironment(this.rootProperties.HostEnvironment);

		LocationReferenceEnvironment parentEnvironment = null;
		switch (this.relationshipToParent) {
		case ArgumentExpression:
			parentEnvironment = this.getParent().getPublicEnvironment().getParent();
			if (parentEnvironment == null)
				parentEnvironment = this.getRoot().getRootProperties().HostEnvironment;
			break;
		case Child:
			// not break, same as VariableDefault
		case VariableDefault:
			parentEnvironment = this.getParent().getPublicEnvironment();
			break;
		case ImplementationChild:
			parentEnvironment = this.getParent().getImplementationEnvironment();
			break;
		default:
			break;
		}

		return parentEnvironment;
	}