Fix for locking issues in redmine/6334

meh, this whole file shouldn't have been there, seems like I forgot to commit my last changes that cleaned up stuff.