issue #24469 - handle duplicated release attempts

The desktop client tries to release the same lock multiple times in at least one customer database. This appears related to the search path as well as other unknown factors. These changes make the qt client less sensitive external factors that might affect when and whether records have been locked or released.

This should undergo UAT before being merged if possible, with at least 2 clients trying to manipulate the same orders in a variety of sequences and overlaps, with a variety of packages installed, with both mobilized and unmobilized databases!