Issue #2714989 by dawehner, jibran: Views which load the same entity type as entity and non default revision cause fatal in Sql::getCacheTags()