[Core] Fix crash in the project buidler finalizer