Added tests for bug #254 (fixed in #256)