Added additional wrapping and error checking to check for and (attempt to) maintain the reference to as2transition's repository.