Ah, despite my rant, there is an easy solution. And it makes it very
clear the oddness of the way Ruby parser work here:

      if pkg.gem
        pkg = pkg.__merge__( pkg.gem )
      else
        pkg = pkg
      end

It won't work without the 'pkg = pkg'.

T.