Fix issue with empty generators

When the function body does not contain any yield or return no state machine is created. If this happen we create a state machine with a single fall through state.

Fixes #301