SetAnimInstanceClass crash in Blueprints with 4.17.2 (didnt with 4.15.2)

SetAnimInstanceClass crashes with valid Anim Instance Class specified. This has worked with 4.15.2 but doesn’t after updating to 4.17.2. There was no change to the code, after upgrade it just didn’t work anymore. The anim instance class we want to set is different than the one that’s already set, we’ve printed the name of the class to make sure we are setting exactly what we want. Not sure what could cause this but it brakes the project generally and we cannot run anymore.

Screens with stack and blueprint code for the specified issue.

The same thing happens with 4.18 version.

More context information on this: The call to SetAnimInstanceClass is made as a result of a Notify inside an animation part of the Instance running on the skeletal mesh on which this new animation instance class would be set.
In short, we have a character we set an animation instance class on and have some animations running on it. Once one of the animations reaches a certain time will trigger a Notify to change the animation instance class the animation is running on. The stack error suggests some kind of cycling occurring yet it worked just fine on 4.15.2.

Alright, so I got rid of the crash by re-engineering the call to SetAnimInstanceClass outside of the animation instance class that’s already set and this works fine (there’s some visual issues with animations switching since now it doesn’t execute on the spot when the notify is called but at the next update so the animation containing the notify goes on and does something we don’t need to see but this is fixable as well).
However, the crash remains and as a feature that worked fine in 4.15 and not working in 4.17 and beyond it probably still needs to be fixed.