Remove get_default_sources and instead pass around flags explicitly
This makes sure that we use the flag configuration stored in the Transaction where appropriate instead of looking up the out of date information.
Supersedes !435 (closed). It works better and is still fairly simple of a change.