#753284 by mikeryan: Basic implementation of sourceOfRecord==DESTINATION handling, backported from D7