Linearity fixes.

- added non-linearity griper
- fix bug in linearity checking for function literals