Add circular dependency check for tickets,
 and refactor to get repositoryModel always from the page