Fixes #4968 Added target_guid and related functionalities to river

This PR may still need some work. Comments are welcome.