Add memFlags validation against parent buffer memFlags in createSubBuffer