Ensure GetExecutingAssembly called at right time

My last change caused this method to be called in cases where it could
potentially throw an exception.