[BISERVER-11485] Fixing unlock in clear()