Add test case for multiple dependencies

And also tests that side effects from a+=b statements are handled
properly.

See #36.