Not really sure what could be causing this problem. Do you have some minimal code which reproduces the problem? Also note that if you are seeing this problem within Apple’s auval
then have a look at this thread which was a bug in auval
which was only recently fixed in 10.13.3.