Steps to reproduce:
1. PHP 8.2.17; Phorge at `328aee033fbdc704620e2facae4aa68b836217bb`
2. Make sure rPd5a28e12a005e7082dab685dd6e615da5213db33 from T15275 is deployed.
3. Set up a project tag `project` which includes a username mention `@username` in its project description and that user is not the currently logged in user.
4. In a task comment, write the project tag `#project`.
5. Hover over the project tag.
```
[2024-03-21 22:33:27] EXCEPTION: (PhabricatorDataNotAttachedException) Attempting to access attached data on PhabricatorProject, but the data is not actually attached. Before accessing attachable data on an object, you must load and attach it.
Data is normally attached by calling the corresponding needX() method on the Query class when the object is loaded. You can also call the corresponding attachX() method explicitly. at [<phorge>/src/infrastructure/storage/lisk/PhabricatorLiskDAO.php:283]
[2024-03-19 15:55:08] EXCEPTION: (PhabricatorDataNotAttachedException) Attempting to access attached data on PhabricatorProject, but the data is not actually attached. Before accessing attachable data on an objectarcanist(head=master, you must load and attach it.\n\nData is normally attached by calling the corresponding needX() method on the Query class when the object is loaded.ref.master=174bf094ef9f), You can also call the corresponding attachX() method explicitly.phorge(head=master, at [<phorge>/src/infrastructure/storage/lisk/PhabricatorLiskDAO.php:283]ref.master=d42b3eb0b17a)
#0 <#2> PhabricatorLiskDAO::assertAttachedKey(array, string) called at [<phorge>/src/applications/project/storage/PhabricatorProject.php:210]
#1 <#2> PhabricatorProject::isUserMember(string) called at [<phorge>/src/applications/project/storage/PhabricatorProject.php:147]
#2 <#2> PhabricatorProject::hasAutomaticCapability(string, PhabricatorUser) called at [<phorge>/src/applications/policy/filter/PhabricatorPolicyFilter.php:539]
#3 <#2> PhabricatorPolicyFilter::checkCapability(PhabricatorProject, string) called at [<phorge>/src/applications/policy/filter/PhabricatorPolicyFilter.php:268]
#4 <#2> PhabricatorPolicyFilter::apply(array) called at [<phorge>/src/applications/policy/filter/PhabricatorPolicyFilterSet.php:93]
#5 <#2> PhabricatorPolicyFilterSet::resolveCapabilities() called at [<phorge>/src/applications/policy/filter/PhabricatorPolicyFilterSet.php:54]
#6 <#2> PhabricatorPolicyFilterSet::hasCapability(PhabricatorUser, PhabricatorProject, string) called at [<phorge>/src/applications/people/markup/PhabricatorMentionRemarkupRule.php:1196]
#7 <#2> PhabricatorMentionRemarkupRule::didMarkupText() called at [<phorge>/src/infrastructure/markup/remarkup/PhutilRemarkupEngine.php:362]
#8 <#2> PhutilRemarkupEngine::postprocessText(array) called at [<phorge>/src/infrastructure/markup/PhabricatorMarkupEngine.php:164]
#9 <#2> PhabricatorMarkupEngine::execute() called at [<phorge>/src/infrastructure/markup/PhabricatorMarkupEngine.php:111]
#10 <#2> PhabricatorMarkupEngine::process() called at [<phorge>/src/infrastructure/markup/PhabricatorMarkupEngine.php:75]
#11 <#2> PhabricatorMarkupEngine::renderOneObject(PhabricatorMarkupOneOff, string, PhabricatorUser, PhabricatorProject) called at [<phorge>/src/infrastructure/markup/view/PHUIRemarkupView.php:876]
#12 <#2> phutil_tag(string, array, PHUIRemarkupView) called at [<phorge>/src/applications/project/view/PhabricatorProjectCardView.php:86]
#12 <#2> phutil_tag(string, array, PHUIRemarkupView) called at [<phorge>/src/applications/project/view/PhabricatorProjectCardView.php:87] <--- ????3 <#2> PhabricatorProjectCardView::getTagContent() called at [<phorge>/src/view/AphrontTagView.php:161]
#13#14 <#2> phutil_escape_html(PhabricatorProjectCardView) called at [<phorge>/src/infrastructure/markup/render.php:139]
#14#15 <#2> phutil_escape_html(array) called at [<phorge>/src/infrastructure/markup/render.php:97]
#15#16 <#2> phutil_tag(string, array, array) called at [<phorge>/src/infrastructure/javelin/markup.php:70]
#16#17 <#2> javelin_tag(string, array, array) called at [<phorge>/src/view/AphrontTagView.php:16158]
#17#18 <#2> AphrontTagView::render() called at [<phorge>/src/view/AphrontView.php:222]
#18#19 <#2> AphrontView::producePhutilSafeHTML() called at [<phorge>/src/infrastructure/markup/render.php:115]
#19#20 <#2> phutil_escape_html(PHUIHovercardView)
#20#21 <#2> array_map(string, array) called at [<phorge>/src/infrastructure/markup/render.php:185]
#21#22 <#2> hsprintf(string, PHUIHovercardView) called at [<phorge>/src/aphront/response/AphrontResponse.php:326]
#22#23 <#2> AphrontResponse::processValueForJSONEncoding(PHUIHovercardView, string)
#23#24 <#2> array_walk_recursive(array, array) called at [<phorge>/src/aphront/response/AphrontResponse.php:3420]
#24#25 <#2> AphrontResponse::encodeJSONForHTTPResponse(array) called at [<phorge>/src/aphront/response/AphrontAjaxResponse.php:58]
#25#26 <#2> AphrontAjaxResponse::buildResponseString() called at [<phorge>/src/aphront/response/AphrontResponse.php:70]
#26#27 <#2> AphrontResponse::getContentIterator() called at [<phorge>/src/aphront/sink/AphrontHTTPSink.php:112]
#27#28 <#2> AphrontHTTPSink::writeResponse(AphrontAjaxResponse) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:380]
#28#29 <#2> AphrontApplicationConfiguration::writeResponse(AphrontPHPHTTPSink, AphrontAjaxResponse) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:303]
#29#30 phlog(PhabricatorDataNotAttachedException) called at [<phorge>/src/aphront/handler/PhabricatorAjaxRequestExceptionHandler.php:27]
#30#31 PhabricatorAjaxRequestExceptionHandler::handleRequestThrowable(AphrontRequest, PhabricatorDataNotAttachedException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:751]
#31#32 AphrontApplicationConfiguration::handleThrowable(PhabricatorDataNotAttachedException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:337]
#32#33 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:2043]
#33#34 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phorge>/webroot/index.php:35]
```
This problem does not happen when backing out https://we.phorge.it/rPd5a28e12a005e7082dab685dd6e615da5213db33
Upstreamed from https://phabricator.wikimedia.org/T360530