[BUGFIX] Correctly remember acquired shared locks