added a test for trac ticket 657

@mmklee 
@hannes14 

many thanks for the fix, but please also keep in mind:

not tested=> not fixed !
not tested=> not fixed !
not tested=> not fixed !
not tested=> not fixed !
not tested=> not fixed !
...
...


Jakob