Added checks to prevent use of anonymous inner-classes as submissions for RemoteExecutors (they are never serializable)