Make sure permission checks also check against current revisions

Change-Id: I4b63b5ab3f428b499dc5318298238b50b17978e8
Merge "Make sure permission checks also check against current revisions"