See https://discourse.phabricator-community.org/t/daemons-tasks-crashing-in-a-loop-during-reindex/506/1. Some object types (for example, Passphrase Credentials) support indexing but not commenting.
Make withComments(...) work properly if the transaction type does not support comments.