1343 overlap obligation

fixes #1343 by renaming variables if a clash is possible.

@mcodescu please review (this patch will clash with #1337)