Renamed to issue541
Added testcase for #582
Removed obsolete tests
Added testcase for #578
Removed obsolete tests