pre-expand code more, and work around a julia serializer bug exposed by the expanded code