I started casting the Spell outside of influence area. NPC is at peace with me but because a resouce is nearby builds an outpost near me and places me in his influence. Non-aggresion pact ends and he asks me to leave. I leave and game moves me though normally quest does not allow you to move while casting. Spell continues to tick down to 25 turns but game doesnt end. I simultaneously research Dances with Dragons(which needed 20 turns to complete ) in case Magic tree needed to be maxed and recast. 25 turns later game ends properly.
This is a weird bug and I guess people won't encounter it as I doubt they would cast the spell out in the open. Thought I'd post it in case my circumstances are not what caused it and Spell of Remaking is truely bugged and needs to be cast twice. The spell research bar was full prior to researching Dances with Dragons in the Kingdom report screen.