anchor.diff:              |> Map.union (oneSideValueBinders onlyRightVariables conditionedRightValueBinders)
               |> Map.union procSharedValueBinders
   
  -        if procRightModel.Sources |> List.isEmpty then
  -            let updatedAssignments =
  -                procRightModel.Assignments
  -                |> List.map (
  -                    fun x ->
  -                        { x with
  -                            Expression =
  -                                {
  -                                    Condition = conditionToAdd
  -                                    Expression = x.Expression
  -                                }
  -                                |> List.singleton
  -                                |> Switch
  -                                |> optimizeRelationalExpression
  -                        }
  -                )
  -
  -            {
  -                Model =
  -                    { leftModel with
  -                        Assignments =
  -                            leftModel.Assignments @ updatedAssignments
  +        let updatedAssignments =
  +            procRightModel.Assignments
  +            |> List.map (
  +                fun x ->
  +                    { x with
  +                        Expression =
  +                            {
  +                                Condition = conditionToAdd
  +                                Expression = x.Expression
  +                            }
  +                            |> List.singleton
  +                            |> Switch
  +                            |> optimizeRelationalExpression
                       }
  -                    |> NotModified
  -                    |> optimizeCalculusModel
  -                Bindings = newValueBinders
  -                Variables = newValueBinders |> Map.keys |> List.ofSeq
  -            }
  -        else
  -            {
  -                Model =
  -                    { leftModel with
  -                        Sources =
  +            )
  +
  +        {
  +            Model = 
  +                { leftModel with
  +                    Assignments =
  +                        leftModel.Assignments @ updatedAssignments
  +                    Sources =
  +                        if procRightModel.Sources |> List.isEmpty then
  +                            leftModel.Sources
  +                        else
                               leftModel.Sources @ [
                                   LeftOuterJoinModel(
  -                                    procRightModel,
  -                                    procJoinCondition
  +                                    { procRightModel with
  +                                        Assignments =
  +                                            match extraAssignment with
  +                                            | Some a -> a |> List.singleton
  +                                            | None -> List.empty
  +                                        Filters = List.empty
  +                                    },
  +                                    processedLeftJoinCondition
                                   )
                               ]
  -                    }
  -                    |> NotModified
  -                    |> optimizeCalculusModel
  -                Bindings = newValueBinders
  -                Variables = newValueBinders |> Map.keys |> List.ofSeq
  -            }
  +                }
  +                |> NotModified
  +                |> optimizeCalculusModel
  +            Bindings = newValueBinders
  +            Variables = newValueBinders |> Map.keys |> List.ofSeq
  +        }
       else
           let conditionProc =
               joinConditions
  
positive.code:         let (procRightModel, procJoinCondition, procValueBinders) =
              removeSelfJoins leftModel rightModel conditionProc rightValueBinders
  
          let conditionToAdd =
              procJoinCondition :: procRightModel.Filters
              |> Conjunction
              |> optimizeRelationalCondition
  
          let rec addConditionToValueBinder valueBinder =
              optimizeValueBinder <|
  
negative.code:         |> List.map (processSparqlPattern database typeIndexer)
          |> List.reduce (
              fun left right ->
                  processJoin database typeIndexer None left right
          )
  
      | LeftJoinPattern(left, right, condition) ->
          let leftProc = left |> processSparqlPattern database typeIndexer
          let rightProc = right |> processSparqlPattern database typeIndexer
          processJoin database typeIndexer (condition |> Some) leftProc rightProc
  
      | UnionPattern unioned ->
          let switchVariable = { SqlType = database.IntegerType }
  