Workaround scala.slick.SlickException: Unexpected LetDynamic after Inliner

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