Merge "Restore calling identity before checking permission" into lmp-dev