diff --git a/src/org/rascalmpl/values/RascalFunctionValueFactory.java b/src/org/rascalmpl/values/RascalFunctionValueFactory.java
index df56f84d499..876be4d9794 100644
--- a/src/org/rascalmpl/values/RascalFunctionValueFactory.java
+++ b/src/org/rascalmpl/values/RascalFunctionValueFactory.java
@@ -544,12 +544,12 @@ private IString printSymbol(IConstructor symbol) {
}
protected IValue parse(String methodName, ISet filters, ISourceLocation input, ISourceLocation origin, boolean allowAmbiguity, boolean hasSideEffects) {
- if (origin == null) {
- origin = input;
+ if (origin != null && !origin.equals(input)) {
+ throw new IllegalArgumentException("input and origin should be equal: != ");
}
try {
- return parseObject(methodName, origin, readAll(input), allowAmbiguity, hasSideEffects, filters);
+ return parseObject(methodName, input, readAll(input), allowAmbiguity, hasSideEffects, filters);
}
catch (ParseError pe) {
ISourceLocation errorLoc = pe.getLocation();