final XQExpression retExpr = flwr.getFilteredReturnExpr();
if(retExpr instanceof IfExpr) {
final DependancyChecker dependancyChecker = new DependancyChecker(flwr.getClauses());
retExpr.visit(dependancyChecker, null);
if(!dependancyChecker.hasDependancy()) {
final IfExpr ifExpr = (IfExpr) retExpr;
flwr._filteredReturnExpr = ifExpr.getThenExpr();
flwr.setReturnExpr(null);
ifExpr.setThenExpr(flwr);
return ifExpr;
}
}
return flwr;
}