Fix memory issue where file location messages was created after freeing the source. Fix MySQL test.