I don’t know why the code started to fail in a newer release, but would still recommend to check the mentioned shape and based on this track down why these shapes are wrong now and what might have changed (maybe a method is returning a different shape now or using another default).
You could also check for deprecation warnings in the older (working) release and see if you were ignoring any shape changes.