fix #19306 : Fixing correctly the lengths of the barline

After not having correctly fixed the length of the barline with last commit, this should do it.