Added functional tests for this issue.