If the Global Option "Always use cached permission data" is enabled, this will cause a rebuild job for the materialized data to run every 60 seconds. If edits are done to permissions, and CLI commands that query permissions are run prior to the rebuild job, results may not be as expected.
This option was introduced in TPAM 2.5 with the 2.5.909 release, and in TPAM 2.4 with HotFix 5355.
Disabling the "Always use cached permissions data" option will correct this, as disabling this setting will ensure all results are run using 'live' data. This will come at the cost of performance, as this Global Option was created to enhance performance in certain configurations via the use of cached permission data.
Another workaround would be to add a sufficient delay (120 seconds is suggested) after any changes, prior to running any CLI commands. This should allow for the materialized data job to trigger and complete, ensuring valid results.