core: removed invalid lock release introduced by commit f775e4000e