Added some tests for issue #1397

Signed-off-by: Sven Strickroth <email@cs-ware.de>