1343 overlap obligation

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