If the currently shown entity content isn’t the latest version, it doesn’t make sense to check constraints on it, and might even result in errors (I’m not sure if we correctly handle the case of $( statementId ) being an empty set if the statement doesn’t exist in the current version).
This can happen on diff pages where the current ID isn’t the latest ID, and on historical pages. What’s the best way to detect them? Should we just look at the URL and see if it has a diff or an oldid?