Some speedup in debug for StaticClosure
Fix assign, change cast if factory to static_cast