FYI for everyone: this issue was caused by database corruption. The tblAssetCustom database table, which stores the asset state and other basic asset details, was not populated for some machines. Conversely, there were machines with an entry in tblAssetCustom, but not tblAssets. This should never happen. TblAssets and tblAssetCustom should always have the same number of records. When the Lansweeper service scans an asset, it inserts a record in both tables. There is also a constraint in tblAssetCustom that should ensure that, if a record in tblAssets is deleted, the corresponding record in tblAssetCustom is deleted as well.
Several keys and constraints were missing from the customer's installation, likely due to someone making manual changes to the database. We recommended either restoring the keys and constraints or reinstalling Lansweeper. We would advise anyone to refrain from making custom changes to the database or running custom database scripts, as this could easily break your installation and cause errors.