Workaround scala.slick.SlickException: Unexpected LetDynamic after Inlin...

...er

replaces pattern match on 3-tuple by nested 2-tuples