cppgen: Fix handling of lambdas without hints and fix typo

Lambdas without hints (no optimization) were capturing nothing. Also,
move semantics were applied to the wrong closure subset.