New perspectives on Ray's theorem for the local times of diffusions