Stop clearing locks not owned by KMP and fix the VAB lockout, Fixes #414, #488 and #538.