Added new test, fixes #283, #282, #280