[vm] simplify dealloc dirty logic