issue #19456: release lock before refresh