Add additional tests for listreceivedbyaccount.

Fix bug caught by tests.