copied fix from account_transfer branch.
Merge branch 'next' of github.com:maidsafe/MaidSafe into add_tsan_build_support